From b3d7980b909acab178c337ae536329b82c9f9f8e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 15 Feb 2017 21:19:35 +0100 Subject: [PATCH] - fixed: PowerProtection clamped its damage minimum to 1, but should do it to 0. --- src/menu/menu.cpp | 1 + wadsrc/static/zscript/inventory/powerups.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index 676057321..a8dac6b54 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -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(); diff --git a/wadsrc/static/zscript/inventory/powerups.txt b/wadsrc/static/zscript/inventory/powerups.txt index d355a5e14..828113ac8 100644 --- a/wadsrc/static/zscript/inventory/powerups.txt +++ b/wadsrc/static/zscript/inventory/powerups.txt @@ -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); } }