G_Ticker fixes from RR

ab0094b8d0 95216563a6
This commit is contained in:
NepDisk 2025-03-09 11:07:49 -04:00
parent 033b65a70b
commit 8ed52a3a9d
3 changed files with 15 additions and 9 deletions

View file

@ -57,6 +57,7 @@
#include "k_boss.h" #include "k_boss.h"
#include "doomstat.h" #include "doomstat.h"
#include "s_sound.h" // sfx_syfail #include "s_sound.h" // sfx_syfail
#include "r_fps.h"
// cl loading screen // cl loading screen
#include "v_video.h" #include "v_video.h"
@ -5598,6 +5599,8 @@ boolean TryRunTics(tic_t realtics)
} }
else else
{ {
boolean tickInterp = true;
// run the count * tics // run the count * tics
while (neededtic > gametic) while (neededtic > gametic)
{ {
@ -5625,7 +5628,17 @@ boolean TryRunTics(tic_t realtics)
P_PostLoadLevel(); P_PostLoadLevel();
} }
G_Ticker((gametic % NEWTICRATERATIO) == 0); boolean run = (gametic % NEWTICRATERATIO) == 0;
if (run && tickInterp)
{
// Update old view state BEFORE ticking so resetting
// the old interpolation state from game logic works.
R_UpdateViewInterpolation();
tickInterp = false; // do not update again in sped-up tics
}
G_Ticker(run);
} }
if (Playing() && netgame && (gametic % TICRATE == 0)) if (Playing() && netgame && (gametic % TICRATE == 0))

View file

@ -2071,7 +2071,7 @@ void G_Ticker(boolean run)
} }
} }
D_MapChange(gamemap, gametype, (cv_kartencore.value == 1), false, 1, false, false); D_MapChange(gamemap, gametype, encoremode, false, 1, false, false);
} }
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)

View file

@ -665,13 +665,6 @@ void P_Ticker(boolean run)
players[i].jointime++; players[i].jointime++;
} }
if (run)
{
// Update old view state BEFORE ticking so resetting
// the old interpolation state from game logic works.
R_UpdateViewInterpolation();
}
if (objectplacing) if (objectplacing)
{ {
if (OP_FreezeObjectplace()) if (OP_FreezeObjectplace())