Commit graph

1265 commits

Author SHA1 Message Date
James R
11242527ed 412 teleport: correctly update interpolation state
- Fixes relative teleport not updating floorz/ceilingz,
  causing camera to potentially get clipped by old
  position

- Fixes absolute teleport not resetting viewpoint
  interpolation
2023-04-22 20:49:19 -07:00
Oni
d6d8cf548a Merge branch 'optimize-precip-think' into 'master'
Optimize precipitation by eliminating the thinker entirely

See merge request KartKrew/Kart!1157
2023-04-09 05:31:31 +00:00
toaster
c76fc45de9 P_SwitchWeather: Fix potential infinite loop if non-NullPrecipThinker thinker existed in THINK_PRECIP 2023-04-08 21:55:28 +01:00
James R
9eab5317f3 Stop calling P_NullPrecipThinker
In levels with tens of thousands of precipmobjs, the
overhead of running a thinker for all of them is too much,
no matter how small the thinker is.

ALL thinking is done inside the renderer now, where it can
be limited by distance. Precipmobjs track the last
leveltime they thunk, so interpolated frames don't think
twice.
2023-04-08 13:34:42 -07:00
Sally Coolatta
010fc344df Add equivalent of "Each Time" triggers for ACS 2023-04-06 18:05:05 +01:00
James R
eda16cacb5 line 448: do not change skybox after player finishes the race 2023-03-29 03:54:11 -07:00
James R
77e5bb4d19 line 448: fix skybox mobj reference leak
Calling P_SetTarget on the temporary skybox_t is
pointless. P_SwitchSkybox calls P_SetTarget when copying
to the player struct.
2023-03-29 03:54:11 -07:00
Oni
b9bbb6cb8a Merge branch 'conditions-cascading' into 'master'
Conditions Cascading

Closes #366

See merge request KartKrew/Kart!1053
2023-03-23 23:51:30 +00:00
James R
4b993a3de0 Signs: always use map thing's angle if it exists, else face direction player is moving from
If no map thing exists, should face toward the camera, not
away from it.
2023-03-20 21:01:42 -07:00
James R
15edab5e85 Delay spawning level sign posts, do not use youfuckedup face for tied sign posts
- Sign post spawning is delayed until after thinkers have
  run. This lets ties be tallied.
- Spawn normal (non error) sign for ties.
2023-03-20 20:59:12 -07:00
toaster
4c0077e07c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-19 13:01:06 +00:00
Sally Coolatta
c7fa8fc2bc Spec 500 uses the same speeds as other scrollers 2023-03-18 02:35:26 -04:00
Sally Coolatta
fd9ad6e17d Fix overlap for ACS_Execute args 2023-03-17 01:52:25 -04:00
Sally Coolatta
5332bff0aa Fix Sector_ToggleWaypoints crash 2023-03-17 01:31:53 -04:00
toaster
2e1efaff0c Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading
# Conflicts:
#	src/k_battle.c
#	src/k_hud_track.cpp
#	src/k_kart.c
#	src/p_inter.c
2023-03-14 21:59:19 +00:00
Sally Coolatta
181501860f Make stringarg application consistent
stringarg[0] and stringarg[1] are now are used as doubles of arg[0] and arg[1]. Specials that use both string args and regular args need to shift their args up to accomedate. This makes the behavior align more closely with the other Doom ports and removes a dumb manual string arg amount thing in callSpecImpl.

I only adjusted the specials that can be called from ACS. I did not mess with level load specials or thing types, since it's not as important. It would be nice to clean them up before release for consistency, though.
2023-03-14 08:03:20 -04:00
Sally Coolatta
f03d9f6dec Calculate thing state only once 2023-03-14 08:03:18 -04:00
Sally Coolatta
730d9a0a5b Extend Thing_SetState
Second argument is now TID. Leaving it as 0 will still use the activator.
2023-03-14 08:02:36 -04:00
toaster
01f6eb71f5 Optimisation: reduce the number of calls to M_CheckUnlockConditions
- For P_Ticker()'s calls to M_UpdateUnlockablesAndExtraEmblems
    - Do not check non-UCRP_REQUIRESPLAYING conditions
        - Controlled by a new `boolean doall` parameter to M_UpdateUnlockablesAndExtraEmblems
        - Most other contexts have this as true
        - Forced true if update is meant to be silent
    - Only check UCRP_REQUIRESPLAYING conditions if a relevant property has been touched
        - Controlled by a new `boolean checkthisframe` property on roundcondition_t
        - Set in all contexts where roundcondition_t is modified
        - Would also be set on lap change, but that case is already covered by the following
- Check all conditions, both UCRP_REQUIRESPLAYING and not, on:
    - local player K_HandleLapIncrement
    - local player P_DoPlayerExit
    - local player P_DoTimeOver
    - Controlled by a new `boolean deferredconditioncheck` property on gamedata_t
2023-03-12 13:52:28 +00:00
James R
3349f17cd7 Update line special 80
- UDMF: use args[1] instead of line tag.
- Binary: do not add thing angle to thing's tag list, just
  compare angle directly. Seemed weird that this was the
  only place in the code to alter the tags list like that.
2023-03-10 04:17:07 -08:00
toaster
d2c36c952a Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading
# Conflicts:
#	src/k_grandprix.c
#	src/k_grandprix.h
2023-03-07 19:37:46 +00:00
Oni
cdc56ab2cc Merge branch 'podium' into 'master'
Podium

See merge request KartKrew/Kart!1014
2023-03-07 05:58:20 +00:00
toaster
4802f96249 UCRP_TRIGGER: Convert to roundconditions_t
- Previously was extern scope UINT32 for all players, but this permits one player in a netgame taking a secret path while others don't.
- Attempted to make user-specifiable string, but while I can undo the effects of strtok for the condition, I cannot undo the effects of strupr - so it's disabled for now until we come up with a more robust and hopefully direct system.
- Also removed some old SRB2-originated assumptions that you couldn't unlock anything in multiplayer from the unlocktrigger system.
2023-03-07 00:03:41 +00:00
Sally Coolatta
c61e017c38 GP rank cleanup
- Move ranking to its own file.
- gpRank (the variable) -> g_gpRank
- gpRank (the struct) -> gpRank_t
- Functions that worked on the global directly now take a pointer to a struct
- Fixed total ring increment
- Fixed final lap's lapPoints being discarded
- Capsules are now added when exiting with the rest of the stuff
2023-03-06 18:25:14 -05:00
Sally Coolatta
55de982fa3 GP ranking
Needs balancing + intermission, but mostly functional
2023-03-06 18:25:14 -05:00
toaster
0f715454fa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-05 19:51:48 +00:00
toaster
5296ab1397 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into conditions-cascading 2023-03-04 20:09:48 +00:00
Sally Coolatta
9073d5bd17 Add CameraWait ACS function
Pauses a script until the tagged camera has no more waypoints to follow.
2023-03-03 16:10:03 -05:00
Sally Coolatta
9b18ce7849 Remove magic camera follow numbers, add 2nd and 3rd follow options 2023-03-03 16:10:03 -05:00
Sally Coolatta
32c6baf2fc Fix + improve podium camera movement
- Record starting position properly for easing
- Uses linear easing now (everything else ended up looking bad with multiple waypoints, would to calculate splines if you wanted to ease that)
- arg4 is now how long the camera spends between each waypoint
2023-03-03 16:09:59 -05:00
Sally Coolatta
9501b57296 Extend cut-away view functionality
- arg2: TID of an object to make the camera's angle/pitch follow.
- arg3: Zoom tube waypoint sequence to start following.

- Ceremony uses one-screen, regardless of previous splitscreen-ed-ness
2023-03-03 16:09:55 -05:00
Sally Coolatta
82313de499 Awayview cleanup
- Moved variables to awayview_t
- Arbritrary +20 is no longer added to z pos, it will use the thing position as the camera position directly.
2023-03-03 16:09:54 -05:00
AJ Martinez
f3f4ac16de SPB Attack: medals, emblems, and fixes 2023-03-03 12:15:00 -08:00
AJ Martinez
6173ca47aa SPB Attack: emblems/medals preliminary 2023-03-03 12:15:00 -08:00
AJ Martinez
79d8e4e109 WIP: SPB Attack - temp menu draws OOB, no unlocks 2023-03-03 12:14:58 -08:00
SteelT
386e32891f Fix the "player has finished the race" message being printed to log twice 2023-03-03 12:00:08 -08:00
toaster
53ce2e4287 Gamedata-related changes + Crash tracking
- Combine multiple adjacent saves
    - Generally could happen during game ticking, combined via gamedata->deferredstate
    - DEFINITELY happened in splitscreen PWR handling, adjust those loops directly
- Write "dirty" state via gamedata->crashflags on everything except safe, intentful unloads
    - Add UC_CRASH, which unlocks dependent on the above "dirty" state being present at gamedata load
    - We can use this for something more useful and less funny later.
- Play "O_LOSERC" on the menu, starting with the Challenges screen, if a UC_CRASH condition has been met.
2023-03-03 13:38:31 +00:00
AJ Martinez
95317d635d Fix upward wind harlem shaking your camera
This has not worked for an unknown period of time, but in this branch it was broken enough that it spun your turning intent out of control.
2023-02-25 23:04:39 -07:00
Oni
a7a3a2c5d5 Merge branch 'special-out' into 'master'
Special Out

See merge request KartKrew/Kart!921
2023-02-17 05:04:34 +00:00
toaster
b2bd5ecccd Merge branch 'blackhole-fault' into 'master'
Fault rework

See merge request KartKrew/Kart!910
2023-02-13 23:23:07 +00:00
AJ Martinez
14fedef403 Revert line fault punish duration (Oni) 2023-02-13 15:54:35 -07:00
AJ Martinez
6996f06ceb Fix line faults doing pflag nonsense 2023-02-13 15:50:00 -07:00
AJ Martinez
c7374c6a91 Increase line fault penalty for similar punishment to old method 2023-02-13 15:32:27 -07:00
AJ Martinez
32ea795639 Fault rework cleanup for merge 2023-02-13 15:31:39 -07:00
toaster
c2b0cca735 K_HandleLapIncrement: Do not spawn Finish Sign if player who crosses finish line is PF_NOCONTESTing. 2023-02-13 18:04:44 +00:00
toaster
24ae5ff65a Repair Linedef types 403 and 404
- P_ProcessSpecial: Correct likely copypaste error in desired plane height and texture
    - Was using sector floor's height and texture instead of ceiling's.
- P_ConvertBinaryLinedefTypes:  assign affected plane in a saner way
- Resolves issue #429
2023-02-13 15:12:53 +00:00
AJ Martinez
de268b744b Beam fault cleanup, make non-circuit death faults respawn at wp behind finish 2023-02-11 19:09:52 -07:00
AJ Martinez
dfdfef3355 Fix missing timer definition, unset player speed when unfaulting 2023-02-03 02:34:36 -07:00
AJ Martinez
101db619e6 Add visual flicker in and out when faulting 2023-02-03 02:23:52 -07:00
AJ Martinez
30457f6b79 Briefly remove players from reality on early POSITION beam cross 2023-02-03 01:39:18 -07:00