- 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.
This commit is contained in:
Christoph Oelckers 2019-08-10 08:26:55 +02:00
parent 541dcab89a
commit 34c2c65bb6

View file

@ -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;
}