diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 3068f2314..4cd6333c5 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -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; } diff --git a/src/d_clisrv.h b/src/d_clisrv.h index c75f7f0bf..e07864122 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -458,4 +458,7 @@ extern UINT8 hu_redownloadinggamestate; extern UINT8 adminpassmd5[16]; extern boolean adminpasswordset; + +extern boolean hu_stopped; + #endif diff --git a/src/d_main.c b/src/d_main.c index 3786efd07..0ae48c927 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -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; }