From 34c2c65bb6e631518addb67470dcf61f5a3f080b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 10 Aug 2019 08:26:55 +0200 Subject: [PATCH] - fixed: Do not use BasicArmor's save percentage when no armor present. This function is only for the Hexen status bar and printed incorrect values. --- wadsrc/static/zscript/ui/statusbar/statusbar.zs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/ui/statusbar/statusbar.zs b/wadsrc/static/zscript/ui/statusbar/statusbar.zs index 70415e8984..e950663202 100644 --- a/wadsrc/static/zscript/ui/statusbar/statusbar.zs +++ b/wadsrc/static/zscript/ui/statusbar/statusbar.zs @@ -582,7 +582,7 @@ class BaseStatusBar native ui } //Hexen counts basic armor also so we should too. let armor = BasicArmor(CPlayer.mo.FindInventory("BasicArmor")); - if(armor != NULL) + if(armor != NULL && armor.Amount > 0) { add += armor.SavePercent * 100; }