Commit graph

1251 commits

Author SHA1 Message Date
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
MascaraSnake
10660411b8 Fix callcount typo 2023-01-27 23:20:13 +00:00
Oni
271dae4643 Merge branch 'refcount-goofin' into 'master'
Additional P_SetTarget mobj_t pointer fixes on player struct

See merge request KartKrew/Kart!875
2023-01-25 01:00:42 +00:00
toaster
ceed74d052 Stumble damagetype
- DMG_STUMBLE in SOC, hardcode
- Has sector type
    - UDMF: damagetype = "Stumble"
    - Binary: Sector type 9, section 1
- Can be chained even when invincible, unlike Tumble
- Will never instinctively cause hitlag
2023-01-22 14:56:42 +00:00
toaster
65c0860a9d P_PushSpecialLine: It's possible for tm.blockingline to be NULL but the player be blocked. 2023-01-21 16:52:25 +00:00
toaster
8555c66d61 activator_t: Before Z_Freeing, consistently decrement refcount for activator->mo per review 2023-01-15 15:12:30 +00:00
toaster
2a87cfcdf1 Additional P_SetTarget mobj_t pointer fixes on player struct
* CL_ClearPlayer (player departing server)
    - In GS_LEVEL, decrement refcount for all relevant pointer
    - Clearer comments
* G_PlayerReborn (initialisation before any player spawn)
    - Preserve skybox data and hoverhyudoro (except between maps)
    - Clean up follower handling
* Cross-codebase: use P_SetTarget for setting skybox-specific pointers, to match p_saveg.c
2023-01-08 15:15:44 +00:00
Sally Coolatta
fdbd1a5f62 Merge branch 'master' into acs 2023-01-07 03:12:39 -05:00
Sally Coolatta
5cc8aa004b Fix linedef action 435 being terrible
This action has apparently always applied the carry scroll factor to both the carrying thinker and the scrolling thinker, so using this means that the conveyor's visual speed is significantly slower than intended and reversed.

Just ran into on a whim when working on the ACS example map
2023-01-07 01:29:40 -05:00
Sally Coolatta
0601579af3 Disable linedef executors in UDMF maps 2023-01-07 00:00:27 -05:00
toaster
f4071ce42f Fix getting race-endingly stuck in zoom tubes while respawning 2023-01-06 13:50:47 +00:00
Sally Coolatta
5b147f59ed Add sector action
Linedef actions, but on sectors. Including args, stringargs, and unique activator flags.
2023-01-06 05:31:53 -05:00
Sally Coolatta
75658fd469 Implement thing special
Executes when an object is killed.
2023-01-05 23:58:48 -05:00
Sally Coolatta
1caf255f5c Merge branch 'master' into acs 2023-01-05 22:23:51 -05:00
toaster
42a6b03e48 Remove "circuitmap"
An effectively useless global scope boolean that literally checks for the presence of a finish line, created in and used only by things we inherited from vanilla SRB2
2022-12-31 23:27:59 +00:00