Compare commits

...
3 changed files with 19 additions and 34 deletions

No files matched your search

+1 -6
View File
@@ -285,7 +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_x2, old_y2, old_z2;
fixed_t old_z2; // ok guess we need that...
// More list: links in sector (if needed)
struct mobj_s *bnext;
@@ -297,7 +297,6 @@ typedef struct mobj_s
// More drawing info: to determine current sprite.
angle_t angle, pitch, roll; // orientation
angle_t old_angle, old_pitch, old_roll; // orientation interpolation
angle_t old_angle2, old_pitch2, old_roll2;
angle_t rollangle;
spritenum_t sprite; // used to find patch_t and flip value
UINT32 frame; // frame number, plus bits see p_pspr.h
@@ -307,9 +306,7 @@ typedef struct mobj_s
fixed_t spritexscale, spriteyscale;
fixed_t spritexoffset, spriteyoffset;
fixed_t old_spritexscale, old_spriteyscale;
fixed_t old_spritexscale2, old_spriteyscale2;
fixed_t old_spritexoffset, old_spriteyoffset;
fixed_t old_spritexoffset2, old_spriteyoffset2;
INT16 lightlevel; // Add to sector lightlevel, -255 - 255
fixed_t realxscale, realyscale; // funn-E streeetch
@@ -320,7 +317,6 @@ typedef struct mobj_s
//sloperollangle
angle_t sloperoll, slopepitch;
angle_t old_sloperoll, old_slopepitch;
angle_t old_sloperoll2, old_slopepitch2;
angle_t pitch_sprite, roll_sprite;
struct msecnode_s *touching_sectorlist; // a linked list of sectors where this object appears
@@ -395,7 +391,6 @@ typedef struct mobj_s
fixed_t scale;
fixed_t old_scale; // interpolation
fixed_t old_scale2;
fixed_t destscale;
fixed_t scalespeed;
+14 -13
View File
@@ -1229,19 +1229,20 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
mobj->flags &= ~MF_DONTENCOREMAP;
// Copy interpolation data :)
ghost->old_x = mobj->old_x2;
ghost->old_y = mobj->old_y2;
ghost->old_z = mobj->old_z2;
ghost->old_angle = (mobj->player ? mobj->player->old_frameangle2 : mobj->old_angle2);
ghost->old_pitch = mobj->old_pitch2;
ghost->old_roll = mobj->old_roll2;
ghost->old_sloperoll = mobj->old_sloperoll2;
ghost->old_slopepitch = mobj->old_slopepitch2;
ghost->old_scale = mobj->old_scale2;
ghost->old_spritexscale = mobj->old_spritexscale2;
ghost->old_spriteyscale = mobj->old_spriteyscale2;
ghost->old_spritexoffset = mobj->old_spritexoffset2;
ghost->old_spriteyoffset = mobj->old_spriteyoffset2;
// 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_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;
ghost->old_sloperoll = mobj->old_sloperoll;
ghost->old_slopepitch = mobj->old_slopepitch;
ghost->old_scale = mobj->old_scale;
ghost->old_spritexscale = mobj->old_spritexscale;
ghost->old_spriteyscale = mobj->old_spriteyscale;
ghost->old_spritexoffset = mobj->old_spritexoffset;
ghost->old_spriteyoffset = mobj->old_spriteyoffset;
return ghost;
}
+4 -15
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,22 +767,7 @@ void R_ResetMobjInterpolationState(mobj_t *mobj)
if (rendermode == render_none)
return;
mobj->old_x2 = mobj->old_x;
mobj->old_y2 = mobj->old_y;
mobj->old_z2 = mobj->old_z;
mobj->old_angle2 = mobj->old_angle;
mobj->old_scale2 = mobj->old_scale;
// rotation humor
mobj->old_pitch2 = mobj->old_pitch;
mobj->old_roll2 = mobj->old_roll;
mobj->old_slopepitch2 = mobj->old_slopepitch;
mobj->old_sloperoll2 = mobj->old_sloperoll;
mobj->old_spritexscale2 = mobj->old_spritexscale;
mobj->old_spriteyscale2 = mobj->old_spriteyscale;
mobj->old_spritexoffset2 = mobj->old_spritexoffset;
mobj->old_spriteyoffset2 = mobj->old_spriteyoffset;
mobj->old_x = mobj->x;
mobj->old_y = mobj->y;