From 74eac3e3f24f7fc84a99d0d395ea507b0f4c9305 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Sun, 27 Mar 2022 22:16:51 -0400 Subject: [PATCH] Wait did this legitimately mostly fix it?! I think it was the realtics check...?! The issue is still here but significantly better... I THINK?? I can't tell if I just hate this code so much I'm telling myself that it's better so I don't have to look at it anymore --- src/d_clisrv.c | 2 +- src/d_main.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index a47b14337..7f6e6f287 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -5149,7 +5149,7 @@ boolean TryRunTics(tic_t realtics) if (demo.playback) { - neededtic = gametic + realtics * (gamestate == GS_LEVEL ? cv_playbackspeed.value : 1); + neededtic = gametic + realtics; // start a game after a demo maketic += realtics; firstticstosend = maketic; diff --git a/src/d_main.c b/src/d_main.c index afb11e0b9..1b23b9a03 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -779,14 +779,21 @@ void D_SRB2Loop(void) refreshdirmenu = 0; // not sure where to put this, here as good as any? + if (demo.playback && gamestate == GS_LEVEL) + { + // Nicer place to put this. + realtics = realtics * cv_playbackspeed.value; + } + #ifdef DEBUGFILE if (!realtics) if (debugload) debugload--; #endif - doDisplay = false; interp = R_UsingFrameInterpolation(); + doDisplay = false; + ticked = false; if (!realtics && !singletics && !interp) { @@ -805,7 +812,8 @@ void D_SRB2Loop(void) realtics = 1; // process tics (but maybe not if realtic == 0) - ticked = TryRunTics(realtics); + if (realtics > 0 || singletics) + ticked = TryRunTics(realtics); if (lastdraw || singletics || gametic > rendergametic) { @@ -843,7 +851,7 @@ void D_SRB2Loop(void) if (!(paused || P_AutoPause())) { -#if 1 +#if 0 CONS_Printf("prevtime = %f\n", prevtime); CONS_Printf("entertime = %f\n", entertime); CONS_Printf("tictime = %f\n", tictime);