diff --git a/language.version b/language.version index 5de7ac52d..04ba1ddbd 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r118 \cu(Mon 13 Jun 10:05:16 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r118 \cu(2022-06-13 10:05:16)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r119 \cu(Mon 13 Jun 15:49:43 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r119 \cu(2022-06-13 15:49:43)\c-"; diff --git a/zscript/hud/swwm_althud.zsc b/zscript/hud/swwm_althud.zsc index 7fe79cff8..768b83804 100644 --- a/zscript/hud/swwm_althud.zsc +++ b/zscript/hud/swwm_althud.zsc @@ -590,25 +590,23 @@ extend Class SWWMStatusBar Screen.DrawTexture(AltAmmoTex[1],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true); xx += 2; let a = AmmoSlots[i]; - let cur = Ammo(CPlayer.mo.FindInventory(a)); + let cur = SWWMAmmo(CPlayer.mo.FindInventory(a)); int amt, amax; if ( !cur ) { amt = 0; amax = GetDefaultByType(a).MaxAmount; - if ( a is 'SWWMAmmo' ) - { - let def = GetDefaultByType((Class)(a)); - if ( def.MagAmmoType ) amax *= GetDefaultByType(def.MagAmmoType).ClipSize; - } + let def = GetDefaultByType(a); + if ( def.MagAmmoType ) + amax *= GetDefaultByType(def.MagAmmoType).ClipSize; } else { amt = cur.Amount; amax = cur.MaxAmount; - if ( (cur is 'SWWMAmmo') && SWWMAmmo(cur).MagAmmoType ) + if ( cur.MagAmmoType ) { - let mag = MagAmmo(CPlayer.mo.FindInventory(SWWMAmmo(cur).MagAmmoType)); + let mag = MagAmmo(CPlayer.mo.FindInventory(cur.MagAmmoType)); // theoretically this should never be null, but nevertheless... if ( mag ) { @@ -617,7 +615,7 @@ extend Class SWWMStatusBar } else { - let def = GetDefaultByType(SWWMAmmo(cur).MagAmmoType); + let def = GetDefaultByType(cur.MagAmmoType); amt = amt*def.ClipSize; amax = amax*def.ClipSize+def.MaxAmount; }