Set old sprite scales and offsets for ghost mobjs

This commit is contained in:
Zwip-Zwap Zapony 2024-01-02 17:51:47 +01:00
parent 564d18b1ea
commit a4cb3960ce
4 changed files with 20 additions and 4 deletions

View file

@ -14443,9 +14443,13 @@ mobj_t *P_SpawnMobjFromMobj(mobj_t *mobj, fixed_t xofs, fixed_t yofs, fixed_t zo
newmobj->old_scale2 = mobj->old_scale2;
newmobj->old_scale = mobj->old_scale;
newmobj->old_spritexscale2 = mobj->old_spritexscale2;
newmobj->old_spritexscale = mobj->old_spritexscale;
newmobj->old_spriteyscale2 = mobj->old_spriteyscale2;
newmobj->old_spriteyscale = mobj->old_spriteyscale;
newmobj->old_spritexoffset2 = mobj->old_spritexoffset2;
newmobj->old_spritexoffset = mobj->old_spritexoffset;
newmobj->old_spriteyoffset2 = mobj->old_spriteyoffset2;
newmobj->old_spriteyoffset = mobj->old_spriteyoffset;
return newmobj;

View file

@ -302,8 +302,8 @@ typedef struct mobj_s
INT32 blendmode; // blend mode
fixed_t spritexscale, spriteyscale;
fixed_t spritexoffset, spriteyoffset;
fixed_t old_spritexscale, old_spriteyscale;
fixed_t old_spritexoffset, old_spriteyoffset;
fixed_t old_spritexscale, old_spriteyscale, old_spritexscale2, old_spriteyscale2;
fixed_t old_spritexoffset, old_spriteyoffset, old_spritexoffset2, old_spriteyoffset2;
struct pslope_s *floorspriteslope; // The slope that the floorsprite is rotated by
struct msecnode_s *touching_sectorlist; // a linked list of sectors where this object appears
@ -441,8 +441,8 @@ typedef struct precipmobj_s
INT32 blendmode; // blend mode
fixed_t spritexscale, spriteyscale;
fixed_t spritexoffset, spriteyoffset;
fixed_t old_spritexscale, old_spriteyscale;
fixed_t old_spritexoffset, old_spriteyoffset;
fixed_t old_spritexscale, old_spriteyscale, old_spritexscale2, old_spriteyscale2;
fixed_t old_spritexoffset, old_spriteyoffset, old_spritexoffset2, old_spriteyoffset2;
struct pslope_s *floorspriteslope; // The slope that the floorsprite is rotated by
struct mprecipsecnode_s *touching_sectorlist; // a linked list of sectors where this object appears

View file

@ -2095,6 +2095,10 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
ghost->old_pitch = mobj->old_pitch2;
ghost->old_roll = mobj->old_roll2;
ghost->old_spriteroll = mobj->old_spriteroll2;
ghost->old_spritexscale = mobj->old_spritexscale2;
ghost->old_spriteyscale = mobj->old_spriteyscale2;
ghost->old_spritexoffset = mobj->old_spritexoffset2;
ghost->old_spriteyoffset = mobj->old_spriteyoffset2;
ghost->old_scale = mobj->old_scale2;
return ghost;

View file

@ -799,6 +799,10 @@ void R_ResetMobjInterpolationState(mobj_t *mobj)
mobj->old_roll2 = mobj->old_roll;
mobj->old_spriteroll2 = mobj->old_spriteroll;
mobj->old_scale2 = mobj->old_scale;
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;
mobj->old_z = mobj->z;
@ -835,6 +839,10 @@ void R_ResetPrecipitationMobjInterpolationState(precipmobj_t *mobj)
mobj->old_pitch2 = mobj->old_pitch;
mobj->old_roll2 = mobj->old_roll;
mobj->old_spriteroll2 = mobj->old_spriteroll;
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;
mobj->old_z = mobj->z;