Ok i guess we still need old_z2 :ChonkBunckle:

This commit is contained in:
indev authored and Alug committed 2025-12-05 00:57:51 +01:00
1 parent 230e731a25
commit ae04e73f2c
3 files changed
+8 -1

No files matched your search

+1
View File
@@ -294,6 +294,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
@@ -1232,7 +1232,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
@@ -724,6 +724,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;
}
@@ -765,6 +769,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;