Re-order P_RemoveShield's first/second layer shield code

This commit is contained in:
Monster Iestyn 2017-08-06 18:57:02 +01:00
parent 0ac63c0949
commit 34908c9b29

View file

@ -2920,7 +2920,17 @@ void P_RemoveShield(player_t *player)
else
player->powers[pw_shield] &= SH_STACK;
}
else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_NONE)
else if (player->powers[pw_shield] & SH_NOSTACK)
{ // First layer shields
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ARMAGEDDON) // Give them what's coming to them!
{
P_BlackOw(player); // BAM!
player->pflags |= PF_JUMPDOWN;
}
else
player->powers[pw_shield] &= SH_STACK;
}
else
{ // Second layer shields
if (((player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER) && !(player->powers[pw_super] || (mariomode && player->powers[pw_invulnerability])))
{
@ -2929,13 +2939,6 @@ void P_RemoveShield(player_t *player)
}
player->powers[pw_shield] = SH_NONE;
}
else if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ARMAGEDDON) // Give them what's coming to them!
{
P_BlackOw(player); // BAM!
player->pflags |= PF_JUMPDOWN;
}
else
player->powers[pw_shield] = player->powers[pw_shield] & SH_STACK;
}
static void P_ShieldDamage(player_t *player, mobj_t *inflictor, mobj_t *source, INT32 damage, UINT8 damagetype)