cl_debugprediction console variable

Makes `gametic` run behind `ClientTic` by n ticks, and forces player prediction code to run. Only works if you are in a singleplayer session.

This is intended to be useful for mod development, as you can quickly test prediction issues without creating a multiplayer server. It may also come in handy if any improvements are made to the prediction code in the future.
This commit is contained in:
Sally Coolatta 2025-03-25 06:41:46 -04:00 committed by Rachael Alexanderson
commit ac42aa8337
2 changed files with 24 additions and 2 deletions

View file

@ -133,6 +133,8 @@ CUSTOM_CVAR(Float, cl_rubberband_limit, 756.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG
self = 0.0f;
}
EXTERN_CVAR (Int, cl_debugprediction)
ColorSetList ColorSets;
PainFlashList PainFlashes;
@ -1440,7 +1442,7 @@ void P_PredictPlayer (player_t *player)
player->mo == NULL ||
player != player->mo->Level->GetConsolePlayer() ||
player->playerstate != PST_LIVE ||
!netgame ||
(!netgame && cl_debugprediction == 0) ||
/*player->morphTics ||*/
(player->cheats & CF_PREDICTING))
{