mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-13 06:13:18 +00:00
Only swap view interp state if a tick is run
This commit is contained in:
parent
f0279e69f2
commit
8908dcccde
2 changed files with 13 additions and 6 deletions
11
src/g_game.c
11
src/g_game.c
|
@ -2363,7 +2363,11 @@ void G_Ticker(boolean run)
|
|||
F_TextPromptTicker();
|
||||
AM_Ticker();
|
||||
HU_Ticker();
|
||||
R_UpdateViewInterpolation();
|
||||
if (run)
|
||||
{
|
||||
R_UpdateViewInterpolation();
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
|
||||
|
@ -2420,7 +2424,10 @@ void G_Ticker(boolean run)
|
|||
if (titlemapinaction)
|
||||
{
|
||||
P_Ticker(run);
|
||||
R_UpdateViewInterpolation();
|
||||
if (run)
|
||||
{
|
||||
R_UpdateViewInterpolation();
|
||||
}
|
||||
// then intentionally fall through
|
||||
}
|
||||
/* FALLTHRU */
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue