Ok i guess we still need old_z2 :ChonkBunckle:

This commit is contained in:
indev committed 2025-12-05 03:10:41 +03:00
1 parent fcf833ff48
commit 834a94e429
3 files changed
+8 -1

No files matched your search

+1
View File
@@ -285,6 +285,7 @@ typedef struct mobj_s
// Info for drawing: position.
fixed_t x, y, z;
fixed_t old_x, old_y, old_z; // position interpolation
fixed_t old_z2; // ok guess we need that...
// More list: links in sector (if needed)
struct mobj_s *bnext;
+1 -1
View File
@@ -1241,7 +1241,7 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
// old_x - mobj->momx - hack to preserve vanilla look
ghost->old_x = mobj->old_x - mobj->momx;
ghost->old_y = mobj->old_y - mobj->momy;
ghost->old_z = mobj->old_z - mobj->momz;
ghost->old_z = mobj->old_z2; // Slopes.....
ghost->old_angle = (mobj->player ? mobj->player->old_frameangle : mobj->old_angle);
ghost->old_pitch = mobj->old_pitch;
ghost->old_roll = mobj->old_roll;
+6
View File
@@ -722,6 +722,10 @@ void R_AddMobjInterpolator(mobj_t *mobj)
interpolated_mobjs.push_back(mobj);
// Maybe not the best place for it, but for first tic this old_z is 0,
// so when R_ResetMobjInterpolationState is called old_z2 will be set to 0
mobj->old_z = mobj->z;
R_ResetMobjInterpolationState(mobj);
mobj->resetinterp = true;
}
@@ -763,6 +767,8 @@ void R_ResetMobjInterpolationState(mobj_t *mobj)
if (rendermode == render_none)
return;
mobj->old_z2 = mobj->old_z;
mobj->old_x = mobj->x;
mobj->old_y = mobj->y;
mobj->old_z = mobj->z;