- fixed: BaseStatusbar::GetAmount returned the default item's amount if the player held none of the given type. This should only be done for MaxAmount.

This commit is contained in:
Christoph Oelckers 2017-04-01 13:33:42 +02:00
parent 7dae43bf7f
commit 553906b186

View file

@ -452,7 +452,7 @@ class BaseStatusBar native ui
int, int GetAmount(class<Inventory> item)
{
let it = CPlayer.mo.FindInventory(item);
int ret1 = it? it.Amount : GetDefaultByType(item).Amount;
int ret1 = it? it.Amount : 0;
int ret2 = it? it.MaxAmount : GetDefaultByType(item).MaxAmount;
return ret1, ret2;
}