diff options
Diffstat (limited to 'src/cgame/cg_weapons.c')
-rw-r--r-- | src/cgame/cg_weapons.c | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 4c203b4c..2703dc00 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1149,36 +1149,23 @@ void CG_DrawWeaponSelect( rectDef_t *rect, vec4_t color ) if( ( item >= 0 ) && ( item < numItems ) ) { - switch( cent->currentState.weapon ) + if( clips == 0 && !BG_FindInfinteAmmoForWeapon( cent->currentState.weapon ) ) { - case WP_ABUILD: - case WP_ABUILD2: - case WP_HBUILD: - case WP_HBUILD2: - break; - - default: - if( clips == 0 ) - { - float ammoPercent = (float)ammo / (float)maxAmmo; - - if( ammoPercent < 0.33f ) - { - color[ 0 ] = 1.0f; - color[ 1 ] = color[ 2 ] = 0.0f; - } - } - break; + float ammoPercent = (float)ammo / (float)maxAmmo; + + if( ammoPercent < 0.33f ) + { + color[ 0 ] = 1.0f; + color[ 1 ] = color[ 2 ] = 0.0f; + } } trap_R_SetColor( color ); if( items[ item ] <= 32 ) - CG_DrawPic( x + ICON_BORDER, y + ICON_BORDER, iconsize - 2 * ICON_BORDER, iconsize - 2 * ICON_BORDER, - cg_weapons[ items[ item ] ].weaponIcon ); + CG_DrawPic( x, y, iconsize, iconsize, cg_weapons[ items[ item ] ].weaponIcon ); else if( items[ item ] > 32 ) - CG_DrawPic( x + ICON_BORDER, y + ICON_BORDER, iconsize - 2 * ICON_BORDER, iconsize - 2 * ICON_BORDER, - cg_upgrades[ items[ item ] - 32 ].upgradeIcon ); + CG_DrawPic( x, y, iconsize, iconsize, cg_upgrades[ items[ item ] - 32 ].upgradeIcon ); trap_R_SetColor( NULL ); |