Merge branch 'fix-interp-sped-up-tics' into 'master'

Fix titlemap camera bug

Closes #799

See merge request KartKrew/Kart!2129
This commit is contained in:
toaster 2024-03-21 21:55:02 +00:00
commit 6a08198477
2 changed files with 14 additions and 8 deletions

View file

@ -66,6 +66,7 @@
#include "music.h"
#include "k_bans.h"
#include "sanitize.h"
#include "r_fps.h"
// cl loading screen
#include "v_video.h"
@ -6045,6 +6046,8 @@ boolean TryRunTics(tic_t realtics)
if (ticking)
{
boolean tickInterp = true;
// run the count * tics
while (neededtic > gametic)
{
@ -6073,7 +6076,17 @@ boolean TryRunTics(tic_t realtics)
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))

View file

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