Fixes several things to do with the boss healthbar.
- Makes its randomised jitter work with interp/pause
- Constantly calling the external PRNG tanks performance, at least on Windows, so this solves that too
Done as a special non-netsynced random class so the author of this commit wouldn't have to create a third suite of duplicated Random functions.
Previously, there was a permanent exception for Eggrobo (the default bot skin).
Now that exception is generalised for the specific skin the bot is being assigned, which we assume is intentful and correct.
In addition, the randomclass PR_BOTS now controls K_RetireBots as well, matching the other two random calls done for bot skins.
I'm not sure exactly where the bot code leaks, other than knowing its the prediction for sure (because the prediction is the only memory bots ever allocate), but srb2::finally is cool and lets me not care :)
- Repair connecting to a modded server via direct IP/address
- Done by leveraging serverlistultimatecount
- !server was good for avoiding dinging modded local games, but there was other behaviour broken.
- Don't underflow serverlistultimatecount on rejection of undesired serverinfo
- Fixed followers.pk3 asset hash checking.
- Moved asset hashes from config.h to d_main.c directly.
- Changes to config.h.in require building the game twice
and having it in d_main.c is just more contained.
- Removed old reset on holepunchserver if it was set to
the wrong address. This was only relevant for a short
period of time during development.
- Fixed cv_kartencoremap being used outside of DEVELOP.
- Fixed unused variable warning in GotOurIP.
This is done in a different location in the previous entry in the series, but the author of this commit couldn't find it.
Since we're using the 2.2 codebase, it's been put where they have it instead.
- KartKrew/Kart-Public!313 has finally been integrated with the changed menu code
- Attempts multiple times to get every public server, up to nettimeout
- Clear the server list when entering/exiting and refrehing
- Show visible servers and potential servers opposite the Refresh input
- I would have done this in another commit, but the system was too broken to repair without just putting the working solution in wholesale
- Improved visual scrolling behaviour
- Pressing A actually joins the server
- CORE vs MODDED is handled in SL_InsertServer, not a seperate function to drop/memcpy things around
Also, abstract out the little "PLEASE WAIT..." message popup during potential IO block into M_PleaseWait (only used on connect process via Menu)
- 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
(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.
- CL_ClearPlayer
- Delete followmobj, stumbleIndicator, and sliptideZipIndicator
- Wipe flickyAttacker and powerup.flickyController
- G_PlayerReborn
- Properly destroy the Follower and its bubble overlays, etc
- Ensure ringShooter pointer is kept
- Delete followmobj, stumbleIndicator, and sliptideZipIndicator
- Wipe flickyAttacker and powerup.flickyController
- P_PlayerThink
- Ensure all invalid pointers are erased, even on hitlag frames
Fixes ourIP being set on every map change
Also catches a possible case where joining clients can sigfail in the window between map change and stun response
- Permits the use of the existing K_HandleMenuMessage MM_YESNO system, instead of the faked previous implementation
- Removes the "cl_requestmode" hack
- The only area of the game that fakes handling Menu Messages is the title screen, now, due to the lack of guarantees for menu inputs.
- *Also* permits Screenshots and video/lossless Recordings to be started/ended on this menu.
- M_StopMessage is now in charge of setting the answer to a given prompt.
- Menu Messages can now be dismissed on the title screen, instead of carried into the top-level menu transition.