Don't interpolate during net lag

This commit is contained in:
Eidolon 2022-05-17 19:57:31 -05:00
parent 7c00cea1fc
commit 32b166669e
3 changed files with 20 additions and 1 deletions

View file

@ -114,6 +114,9 @@ static INT16 consistancy[BACKUPTICS];
static UINT8 player_joining = false;
UINT8 hu_redownloadinggamestate = 0;
// true when a player is connecting or disconnecting so that the gameplay has stopped in its tracks
boolean hu_stopped = false;
UINT8 adminpassmd5[16];
boolean adminpasswordset = false;
@ -5259,8 +5262,16 @@ boolean TryRunTics(tic_t realtics)
ticking = neededtic > gametic;
if (ticking)
{
if (realtics)
hu_stopped = false;
}
if (player_joining)
{
if (realtics)
hu_stopped = true;
return false;
}
@ -5300,6 +5311,11 @@ boolean TryRunTics(tic_t realtics)
break;
}
}
else
{
if (realtics)
hu_stopped = true;
}
return ticking;
}

View file

@ -458,4 +458,7 @@ extern UINT8 hu_redownloadinggamestate;
extern UINT8 adminpassmd5[16];
extern boolean adminpasswordset;
extern boolean hu_stopped;
#endif

View file

@ -853,7 +853,7 @@ void D_SRB2Loop(void)
renderdeltatics = FLOAT_TO_FIXED(deltatics);
if (!(paused || P_AutoPause()))
if (!(paused || P_AutoPause()) && !hu_stopped)
{
rendertimefrac = g_time.timefrac;
}