- fixed: PowerProtection clamped its damage minimum to 1, but should do it to 0.

This commit is contained in:
Christoph Oelckers 2017-02-15 21:19:35 +01:00
parent bd86abede3
commit b3d7980b90
2 changed files with 2 additions and 1 deletions

View File

@ -270,6 +270,7 @@ bool DMenu::CallMenuEvent(int mkey, bool fromcontroller)
void DMenu::Close ()
{
if (DMenu::CurrentMenu == nullptr) return; // double closing can happen in the save menu.
assert(DMenu::CurrentMenu == this);
DMenu::CurrentMenu = mParentMenu;
Destroy();

View File

@ -1767,7 +1767,7 @@ class PowerProtection : Powerup
{
if (passive && damage > 0)
{
newdamage = max(1, ApplyDamageFactors(GetClass(), damageType, damage, damage / 4));
newdamage = max(0, ApplyDamageFactors(GetClass(), damageType, damage, damage / 4));
if (Owner != null && newdamage < damage) Owner.A_PlaySound(ActiveSound, CHAN_AUTO, 1.0, false, ATTN_NONE);
}
}