Fix incorrect values in HUD for unobtained ammo.
This commit is contained in:
parent
3de1290071
commit
d8bf8a6063
2 changed files with 15 additions and 3 deletions
|
|
@ -2743,7 +2743,19 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
amax = GetDefaultByType(a).MaxAmount;
|
||||
let def = GetDefaultByType(a);
|
||||
if ( def.MagAmmoType )
|
||||
amax *= GetDefaultByType(def.MagAmmoType).ClipSize;
|
||||
{
|
||||
let mag = MagAmmo(CPlayer.mo.FindInventory(def.MagAmmoType));
|
||||
if ( mag )
|
||||
{
|
||||
amt = mag.Amount;
|
||||
amax = amax*mag.ClipSize+mag.MaxAmount;
|
||||
}
|
||||
else
|
||||
{
|
||||
let defmag = GetDefaultByType(def.MagAmmoType);
|
||||
amax = amax*defmag.ClipSize+defmag.MaxAmount;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue