Only swap view interp state if a tick is run

This commit is contained in:
Eidolon 2022-04-11 20:06:52 -05:00
parent f0279e69f2
commit 8908dcccde
2 changed files with 13 additions and 6 deletions

View file

@ -2363,7 +2363,11 @@ void G_Ticker(boolean run)
F_TextPromptTicker();
AM_Ticker();
HU_Ticker();
if (run)
{
R_UpdateViewInterpolation();
}
break;
@ -2420,7 +2424,10 @@ void G_Ticker(boolean run)
if (titlemapinaction)
{
P_Ticker(run);
if (run)
{
R_UpdateViewInterpolation();
}
// then intentionally fall through
}
/* FALLTHRU */

View file

@ -34,7 +34,7 @@ static viewvars_t sky2view_old;
static viewvars_t sky2view_new;
static viewvars_t *oldview = &p1view_old;
static BOOL oldview_valid = FALSE;
static boolean oldview_valid = false;
viewvars_t *newview = &p1view_new;
@ -95,7 +95,7 @@ void R_InterpolateView(fixed_t frac)
if (frac > FRACUNIT)
frac = FRACUNIT;
if (oldview_valid == FALSE)
if (oldview_valid == false)
{
// interpolate from newview to newview
prevview = newview;
@ -131,12 +131,12 @@ void R_UpdateViewInterpolation(void)
p2view_old = p2view_new;
sky1view_old = sky1view_new;
sky2view_old = sky2view_new;
oldview_valid = TRUE;
oldview_valid = true;
}
void R_ResetViewInterpolation(void)
{
oldview_valid = FALSE;
oldview_valid = false;
}
void R_SetViewContext(enum viewcontext_e _viewcontext)