From 553906b186de9dc8e58c0ab5509e8db2ca2eeab9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 1 Apr 2017 13:33:42 +0200 Subject: [PATCH] - 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. --- wadsrc/static/zscript/statusbar/statusbar.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wadsrc/static/zscript/statusbar/statusbar.txt b/wadsrc/static/zscript/statusbar/statusbar.txt index 0af3442d2..434d4bd6a 100644 --- a/wadsrc/static/zscript/statusbar/statusbar.txt +++ b/wadsrc/static/zscript/statusbar/statusbar.txt @@ -452,7 +452,7 @@ class BaseStatusBar native ui int, int GetAmount(class 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; }