mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 22:21:05 +00:00
Don't interpolate during net lag
This commit is contained in:
parent
7c00cea1fc
commit
32b166669e
3 changed files with 20 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -458,4 +458,7 @@ extern UINT8 hu_redownloadinggamestate;
|
|||
|
||||
extern UINT8 adminpassmd5[16];
|
||||
extern boolean adminpasswordset;
|
||||
|
||||
extern boolean hu_stopped;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue