diff options
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_draw.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 4 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 27 |
3 files changed, 12 insertions, 23 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 3d82440b..b9f227dd 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2220,13 +2220,13 @@ void CG_OwnerDraw( float x, float y, float w, float h, float text_x, CG_DrawKiller( &rect, scale, color, shader, textStyle ); break; case CG_PLAYER_SELECT: - CG_DrawWeaponSelect( &rect, color ); + CG_DrawItemSelect( &rect, color ); break; case CG_PLAYER_WEAPONICON: CG_DrawWeaponIcon( &rect, color ); break; case CG_PLAYER_SELECTTEXT: - CG_DrawWeaponSelectText( &rect, scale, textStyle ); + CG_DrawItemSelectText( &rect, scale, textStyle ); break; case CG_SPECTATORS: CG_DrawTeamSpectators( &rect, scale, color, shader ); diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 3f95b9f5..3d580b4c 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1342,8 +1342,8 @@ void CG_TeslaTrail( vec3_t start, vec3_t end, int srcENum, int destENum ) void CG_AlienZap( vec3_t start, vec3_t end, int srcENum, int destENum ); void CG_AddViewWeapon (playerState_t *ps); void CG_AddPlayerWeapon( refEntity_t *parent, playerState_t *ps, centity_t *cent ); -void CG_DrawWeaponSelect( rectDef_t *rect, vec4_t color ); -void CG_DrawWeaponSelectText( rectDef_t *rect, float scale, int textStyle ); +void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ); +void CG_DrawItemSelectText( rectDef_t *rect, float scale, int textStyle ); // diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index a8e173b4..58bbcea1 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1168,10 +1168,10 @@ WEAPON SELECTION /* =================== -CG_DrawWeaponSelect +CG_DrawItemSelect =================== */ -void CG_DrawWeaponSelect( rectDef_t *rect, vec4_t color ) +void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ) { int i; int x = rect->x; @@ -1249,17 +1249,6 @@ void CG_DrawWeaponSelect( rectDef_t *rect, vec4_t color ) if( ( item >= 0 ) && ( item < numItems ) ) { - if( clips == 0 && !BG_FindInfinteAmmoForWeapon( cent->currentState.weapon ) ) - { - 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 ) @@ -1283,10 +1272,10 @@ void CG_DrawWeaponSelect( rectDef_t *rect, vec4_t color ) /* =================== -CG_DrawWeaponSelectText +CG_DrawItemSelectText =================== */ -void CG_DrawWeaponSelectText( rectDef_t *rect, float scale, int textStyle ) +void CG_DrawItemSelectText( rectDef_t *rect, float scale, int textStyle ) { int x, w; char *name; @@ -1354,10 +1343,10 @@ static qboolean CG_WeaponSelectable( int i ) /* =============== -CG_ItemSelectable +CG_UpgradeSelectable =============== */ -static qboolean CG_ItemSelectable( int i ) +static qboolean CG_UpgradeSelectable( int i ) { if( !BG_gotItem( i, cg.snap->ps.stats ) ) return qfalse; @@ -1398,7 +1387,7 @@ void CG_NextWeapon_f( void ) } else if( cg.weaponSelect > 32 ) { - if( CG_ItemSelectable( cg.weaponSelect - 32 ) ) + if( CG_UpgradeSelectable( cg.weaponSelect - 32 ) ) break; } } @@ -1439,7 +1428,7 @@ void CG_PrevWeapon_f( void ) } else if( cg.weaponSelect > 32 ) { - if( CG_ItemSelectable( cg.weaponSelect - 32 ) ) + if( CG_UpgradeSelectable( cg.weaponSelect - 32 ) ) break; } } |