- Avoid iterating displayplayers to find view number and
prefer R_GetViewNumber.
- Iterate over all matching displayplayers if necessary,
instead of stopping at the first match.
- There's a freeze cheat bool to freeze everything except for players.
- There's a level freeze bool to freeze literally everything.
- There's a frozen bool on mobj_t to explicitly control freeze status on an object.
Replaced all mentions of starpostnum and Starpost w/ cheatchecknum and CheatCheck (so Ivo can stop asking why we still need it when its going to save our asses on release patches)
- Store a netsynced SINT8 `hudrings` on the player struct which stores the last rings the player has during play
- So this doesn't get updated after you finish the level
- Fixes the issue where the bot ghost that inhabits your body after finishing will use your rings, muddying how many you took into the total
- Fixed order of operations that prevented lives earned with GP rings from being given
- Also uses hudrings for consistency
- Make the life-give context in P_DoPlayerExit cleaner
- GPEVENT_NONE
- no GTR_SPHERES
- G_AddPlayer now contains CL_ClearPlayer, G_DestroyParty, and playeringame set
- Instead of a nasty, complicated block in P_SpawnPlayer, externalise it into G_SpectatePlayerOnJoin
- All mid-game human player-to-spectator transitions are handled by P_SetPlayerSpectator, instead of lots of `spectator = true` and associated boilerplate
- Simplifies Got_Teamchange MASSIVELY
- Of course this is helped by also stripping back team change
- This is called by P_KillPlayer, too
- P_KillPlayer no longer eats DMG_SPECTATOR when lightsnaking or exiting
- G_GametypeHasSpectators condition tidied
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
ACS script type for game over (lose GP round with no extra lives), improve MapWarp and add a handful of functions
Closes#591 and #572
See merge request KartKrew/Kart!1403
- Save retry condition in G_BeginLevelExit
- Apply condition in G_FinishExitLevel
Preparation for ACS level end scripts, since the exit
condition will need be known when the countdown starts,
not when it ends (that'd be too late to do anything in the
level).
After turning on freecam, the vertical angle is tilted
slightly downward (this is carried over from normal
chasecam).
Interpolate that angle back to normal while moving
forward. This makes it so you don't need to manually
adjust the vertical angle, since it would cause forward
movement to send you into the ground.
(This commit does not compile. Sound test and tunes
command code needs to be ported after this.)
This is a big one. Here's the rundown:
The old music system was very direct, much of the time
just a proxy to the real sound API in i_sound.h.
You could change the music on command, but there wasn't
a consistent way to prevent some music from playing over
others. P_RestoreMusic is one example of needing to
address this problem. The jingles system was intended as
another solution. Furthermore, sound test (Stereo) has its
own needs.
I am removing all of that. Music handling in general is
now a very deliberate system, kind of similar to jingles.
In the new system, "tunes" are registered. The tune stores
info such as whether it should loop or fade out. Most of
the configuration is intended to be initialized only ONCE.
Tunes can be mapped to an actual music lump. They can be
remapped at any time too.
Tunes are also configured with a priority number. This
determines which tune is heard, if multiple are supposed
to be playing at a time. You can even tell a tune how long
it should play, so it's unnecessary to track this with
bespoke timers.