mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- fixed: PowerProtection clamped its damage minimum to 1, but should do it to 0.
This commit is contained in:
parent
bd86abede3
commit
b3d7980b90
2 changed files with 2 additions and 1 deletions
|
@ -270,6 +270,7 @@ bool DMenu::CallMenuEvent(int mkey, bool fromcontroller)
|
||||||
|
|
||||||
void DMenu::Close ()
|
void DMenu::Close ()
|
||||||
{
|
{
|
||||||
|
if (DMenu::CurrentMenu == nullptr) return; // double closing can happen in the save menu.
|
||||||
assert(DMenu::CurrentMenu == this);
|
assert(DMenu::CurrentMenu == this);
|
||||||
DMenu::CurrentMenu = mParentMenu;
|
DMenu::CurrentMenu = mParentMenu;
|
||||||
Destroy();
|
Destroy();
|
||||||
|
|
|
@ -1767,7 +1767,7 @@ class PowerProtection : Powerup
|
||||||
{
|
{
|
||||||
if (passive && damage > 0)
|
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);
|
if (Owner != null && newdamage < damage) Owner.A_PlaySound(ActiveSound, CHAN_AUTO, 1.0, false, ATTN_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue