Hide shield overlays and not just the shield while shieldscale zero

This commit is contained in:
pastel 2025-01-01 13:14:13 -06:00
parent 3e6862b1c2
commit 7168aa73bf

View file

@ -6790,6 +6790,12 @@ void P_RunOverlays(void)
else
zoffs = 0;
// hide the overlay as well if we're part of a hidden shield
if ((mo->target->flags2 & (MF2_JUSTATTACKED|MF2_DONTDRAW)) == (MF2_JUSTATTACKED|MF2_DONTDRAW))
mo->flags2 |= (MF2_DONTDRAW|MF2_JUSTATTACKED);
else if (mo->flags2 & MF2_JUSTATTACKED)
mo->flags2 &= ~(MF2_DONTDRAW|MF2_JUSTATTACKED);
P_UnsetThingPosition(mo);
mo->x = mo->target->x;
mo->y = mo->target->y;