revert "R_ResetViewInterpolation: wait an extra tic if R_UpdateViewInterpolation has not run yet, do not add extra time for subsequent calls"

This commit is contained in:
Alug committed 2025-03-23 15:30:45 +01:00
1 parent 2306d4b59b
commit a560c691ca
1 file changed
+2 -9
+2 -9
View File
@@ -80,7 +80,6 @@ static viewvars_t skyview_old[MAXSPLITSCREENPLAYERS];
static viewvars_t skyview_new[MAXSPLITSCREENPLAYERS];
static viewvars_t *oldview = &pview_old[0];
static tic_t last_view_update;
static int oldview_invalid[MAXSPLITSCREENPLAYERS] = {0, 0, 0, 0};
viewvars_t *newview = &pview_new[0];
@@ -214,27 +213,21 @@ void R_UpdateViewInterpolation(void)
if (oldview_invalid[i]) oldview_invalid[i]--;
}
last_view_update = I_GetTime();
}
void R_ResetViewInterpolation(UINT8 p)
{
// Wait an extra tic if the interpolation state hasn't
// updated yet.
int t = ((last_view_update == I_GetTime()) ? 1 : 2);
if (p == 0)
{
UINT8 i;
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
{
oldview_invalid[i] = t;
oldview_invalid[i]++;
}
}
else
{
oldview_invalid[p - 1] = t;
oldview_invalid[p - 1]++;
}
}