Make P_SpawnGhostMobj ghosts properly copy spritestuff2 variables

- spritexscale
- spriteyscale
- spritexoffset
- spriteyoffset
- renderflags
This commit is contained in:
toaster 2022-09-07 13:24:31 +01:00
parent 7adca2ef19
commit 4d52ca53e7

View file

@ -1197,7 +1197,7 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
ghost->sprite2 = mobj->sprite2;
ghost->frame = mobj->frame;
ghost->tics = -1;
ghost->renderflags |= tr_trans50 << RF_TRANSSHIFT;
ghost->renderflags = (mobj->renderflags & ~RF_TRANSMASK)|RF_TRANS50;
ghost->fuse = ghost->info->damage;
ghost->skin = mobj->skin;
ghost->standingslope = mobj->standingslope;
@ -1207,6 +1207,11 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj)
ghost->sprzoff = mobj->sprzoff;
ghost->rollangle = mobj->rollangle;
ghost->spritexscale = mobj->spritexscale;
ghost->spriteyscale = mobj->spriteyscale;
ghost->spritexoffset = mobj->spritexoffset;
ghost->spriteyoffset = mobj->spriteyoffset;
if (mobj->flags2 & MF2_OBJECTFLIP)
ghost->flags |= MF2_OBJECTFLIP;