Always back up players even in singleplayer

This way client-side actions will be consistent between multiplayer and singleplayer.
This commit is contained in:
Boondorl 2025-07-07 23:54:30 -04:00 committed by Ricardo Luís Vaz Silva
commit 17f1c90d4a

View file

@ -1474,26 +1474,14 @@ nodetype *RestoreNodeList(AActor *act, nodetype *linktype::*otherlist, TArray<no
void P_PredictPlayer (player_t *player)
{
int maxtic;
if (demoplayback ||
if (demoplayback || gamestate != GS_LEVEL ||
player->mo == NULL ||
player != player->mo->Level->GetConsolePlayer() ||
player->playerstate != PST_LIVE ||
(!netgame && cl_debugprediction == 0) ||
/*player->morphTics ||*/
(player->cheats & CF_PREDICTING))
{
return;
}
maxtic = ClientTic;
if (gametic == maxtic)
{
return;
}
FRandom::SaveRNGState(PredictionRNG);
// Save original values for restoration later
@ -1546,6 +1534,12 @@ void P_PredictPlayer (player_t *player)
}
act->BlockNode = NULL;
int maxtic = ClientTic;
if (gametic == maxtic || player->playerstate != PST_LIVE)
{
return;
}
// This essentially acts like a mini P_Ticker where only the stuff relevant to the client is actually
// called. Call order is preserved.
bool rubberband = false, rubberbandLimit = false;