mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- 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:
parent
7dae43bf7f
commit
553906b186
1 changed files with 1 additions and 1 deletions
|
@ -452,7 +452,7 @@ class BaseStatusBar native ui
|
||||||
int, int GetAmount(class<Inventory> item)
|
int, int GetAmount(class<Inventory> item)
|
||||||
{
|
{
|
||||||
let it = CPlayer.mo.FindInventory(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;
|
int ret2 = it? it.MaxAmount : GetDefaultByType(item).MaxAmount;
|
||||||
return ret1, ret2;
|
return ret1, ret2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue