Generic weapon display: don't show separate ammo counts if both types are equal.

This commit is contained in:
Mari the Deer 2021-03-11 13:16:19 +01:00
commit bb595df944
2 changed files with 3 additions and 3 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r341 \cu(Wed 10 Mar 21:19:39 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r341 \cu(2021-03-10 21:19:39)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r342 \cu(Thu 11 Mar 13:16:19 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r342 \cu(2021-03-11 13:16:19)\c-";

View file

@ -1718,7 +1718,7 @@ Class SWWMStatusBar : BaseStatusBar
if ( CPlayer.ReadyWeapon.Ammo2 ) astr2 = String.Format("%d",CPlayer.ReadyWeapon.Ammo2.Amount);
if ( CPlayer.ReadyWeapon.Ammo1 ) astr1 = String.Format("%d",CPlayer.ReadyWeapon.Ammo1.Amount);
maxlen = max(astr1.Length(),astr2.Length());
if ( CPlayer.ReadyWeapon.Ammo2 )
if ( CPlayer.ReadyWeapon.Ammo2 && (CPlayer.ReadyWeapon.Ammo2 != CPlayer.ReadyWeapon.Ammo1) )
{
yy -= 14;
Screen.DrawTexture(GenericAmmoTex[2],false,xx,yy,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);