mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
P_Ticker: update view interpolation at the start of a tic
This lets R_ResetViewInterpolation only need to be called once from game logic.
This commit is contained in:
parent
5085bdfdd8
commit
e8a8064da9
5 changed files with 7 additions and 6 deletions
|
|
@ -2090,8 +2090,6 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive)
|
||||||
camerap = &camera[viewnum-1];
|
camerap = &camera[viewnum-1];
|
||||||
P_ResetCamera(&players[(*displayplayerp)], camerap);
|
P_ResetCamera(&players[(*displayplayerp)], camerap);
|
||||||
|
|
||||||
// Why does it need to be done twice?
|
|
||||||
R_ResetViewInterpolation(viewnum);
|
|
||||||
R_ResetViewInterpolation(viewnum);
|
R_ResetViewInterpolation(viewnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,6 @@ public:
|
||||||
// all into its new position -- just snap
|
// all into its new position -- just snap
|
||||||
// instantly into place.
|
// instantly into place.
|
||||||
R_ResetViewInterpolation(1 + i);
|
R_ResetViewInterpolation(1 + i);
|
||||||
R_ResetViewInterpolation(1 + i); // (Why does it need to be called twice?)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
r_splitscreen = size() - 1;
|
r_splitscreen = size() - 1;
|
||||||
|
|
|
||||||
|
|
@ -8093,7 +8093,6 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
||||||
|
|
||||||
if (rendermode != render_none && reloadinggamestate == false)
|
if (rendermode != render_none && reloadinggamestate == false)
|
||||||
{
|
{
|
||||||
R_ResetViewInterpolation(0);
|
|
||||||
R_ResetViewInterpolation(0);
|
R_ResetViewInterpolation(0);
|
||||||
R_UpdateMobjInterpolators();
|
R_UpdateMobjInterpolators();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -646,6 +646,13 @@ 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 (objectplacing)
|
||||||
{
|
{
|
||||||
if (OP_FreezeObjectplace())
|
if (OP_FreezeObjectplace())
|
||||||
|
|
@ -982,7 +989,6 @@ void P_Ticker(boolean run)
|
||||||
if (run)
|
if (run)
|
||||||
{
|
{
|
||||||
R_UpdateLevelInterpolators();
|
R_UpdateLevelInterpolators();
|
||||||
R_UpdateViewInterpolation();
|
|
||||||
|
|
||||||
// Hack: ensure newview is assigned every tic.
|
// Hack: ensure newview is assigned every tic.
|
||||||
// Ensures view interpolation is T-1 to T in poor network conditions
|
// Ensures view interpolation is T-1 to T in poor network conditions
|
||||||
|
|
|
||||||
|
|
@ -3606,7 +3606,6 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
||||||
{
|
{
|
||||||
P_MoveChaseCamera(player, thiscam, false);
|
P_MoveChaseCamera(player, thiscam, false);
|
||||||
R_ResetViewInterpolation(num + 1);
|
R_ResetViewInterpolation(num + 1);
|
||||||
R_ResetViewInterpolation(num + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (x == thiscam->x && y == thiscam->y && z == thiscam->z && angle == thiscam->aiming);
|
return (x == thiscam->x && y == thiscam->y && z == thiscam->z && angle == thiscam->aiming);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue