Revert "more interp fixes"

This reverts commit 3a1a58bcfc.
This commit is contained in:
Alug committed 2024-06-17 12:52:00 +02:00
1 parent 0068312ce3
commit 2f55c10ce3
5 files changed
+23 -29

No files matched your search

+2 -15
View File
@@ -48,7 +48,6 @@
#include "s_sound.h" // sfx_syfail
#include "m_perfstats.h"
#include "d_main.h"
#include "r_fps.h"
#ifdef CLIENT_LOADINGSCREEN
// cl loading screen
@@ -6084,8 +6083,6 @@ boolean TryRunTics(tic_t realtics)
if (ticking)
{
boolean tickInterp = true;
// run the count * tics
while (neededtic > gametic)
{
@@ -6096,20 +6093,10 @@ boolean TryRunTics(tic_t realtics)
if (update_stats)
PS_START_TIMING(ps_tictime);
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);
G_Ticker((gametic % NEWTICRATERATIO) == 0);
ExtraDataTicker();
gametic++;
consistancy[gametic % TICQUEUE] = Consistancy();
consistancy[gametic%TICQUEUE] = Consistancy();
if (update_stats)
{
-1
View File
@@ -2131,7 +2131,6 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive)
(*displayplayerp) = G_FindView(0, viewd, onlyactive, false);
P_ResetCamera(&players[(*displayplayerp)], camerap);
R_ResetViewInterpolation(viewd);
}
}
+6 -1
View File
@@ -2371,7 +2371,11 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
y = sides[line->sidenum[0]].rowoffset;
z = line->frontsector->ceilingheight;
P_SetOrigin(mo, mo->x + x, mo->y + y, mo->z + z);
P_UnsetThingPosition(mo);
mo->x += x;
mo->y += y;
mo->z += z;
P_SetThingPosition(mo);
if (mo->player)
{
@@ -2390,6 +2394,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
camera[i].reset = true;
camera[i].subsector = R_PointInSubsector(camera[i].x, camera[i].y);
R_RelativeTeleportViewInterpolation(i, x, y, z, 0);
R_ResetViewInterpolation(i + 1); // reset view interp as well
break;
}
}
+8 -12
View File
@@ -84,10 +84,8 @@ void P_MixUp(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
{
if (thing->player != &players[displayplayers[i]])
continue;
if (camera[i].chase)
P_ResetCamera(thing->player, &camera[i]);
R_ResetViewInterpolation(i + 1);
break;
}
@@ -159,16 +157,14 @@ boolean P_Teleport(mobj_t *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle
// move chasecam at new player location
for (i = 0; i <= splitscreen; i++)
{
if (thing->player != &players[displayplayers[i]])
continue;
localangle[i] = angle;
if (camera[i].chase)
P_ResetCamera(thing->player, &camera[i]);
R_ResetViewInterpolation(i + 1);
break;
if (thing->player == &players[displayplayers[i]])
{
localangle[i] = angle;
if (camera[i].chase)
P_ResetCamera(thing->player, &camera[i]);
R_ResetViewInterpolation(i + 1);
break;
}
}
// don't run in place after a teleport
+7
View File
@@ -581,6 +581,13 @@ void P_Ticker(boolean run)
if (playeringame[i])
++players[i].jointime;
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())