Reset old_z in MT_LOCKON think

Fixes interpolation artifacting due to spawn pos.
This commit is contained in:
Eidolon 2022-04-27 19:52:11 -05:00
parent f66cedf1fc
commit 813ed81a37

View file

@ -7800,6 +7800,9 @@ static void P_MobjSceneryThink(mobj_t *mobj)
mobj->z = mobj->target->z + mobj->target->height + FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->target->scale); mobj->z = mobj->target->z + mobj->target->height + FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->target->scale);
else else
mobj->z = mobj->target->z - FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->target->scale) - mobj->height; mobj->z = mobj->target->z - FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->target->scale) - mobj->height;
mobj->old_z = mobj->z;
break; break;
case MT_LOCKONINF: case MT_LOCKONINF:
if (!(mobj->flags2 & MF2_STRONGBOX)) if (!(mobj->flags2 & MF2_STRONGBOX))
@ -7811,6 +7814,9 @@ static void P_MobjSceneryThink(mobj_t *mobj)
mobj->z = mobj->threshold + FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->scale); mobj->z = mobj->threshold + FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->scale);
else else
mobj->z = mobj->threshold - FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->scale); mobj->z = mobj->threshold - FixedMul((16 + abs((signed)(leveltime % TICRATE) - TICRATE/2))*FRACUNIT, mobj->scale);
mobj->old_z = mobj->z;
break; break;
case MT_DROWNNUMBERS: case MT_DROWNNUMBERS:
if (!P_DrownNumbersSceneryThink(mobj)) if (!P_DrownNumbersSceneryThink(mobj))