diff options
author | Tim Angus <tim@ngus.net> | 2004-10-17 15:44:13 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2004-10-17 15:44:13 +0000 |
commit | 2c67a10f6799fa7a062f30f6310391bf60c02d5f (patch) | |
tree | f797cc67ac1bcb4780ff15b555ed652f7aa00119 /src/cgame | |
parent | 7ccb349bbdaedd979fb67db17eef757915c8d74a (diff) |
* Gave some of the shared functions more sensible names
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_draw.c | 14 | ||||
-rw-r--r-- | src/cgame/cg_players.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_servercmds.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 18 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index d321d34e..88e1ffc0 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -856,7 +856,7 @@ static void CG_DrawPlayerPoisonBarbs( rectDef_t *rect, vec4_t color, qhandle_t s qboolean vertical; int iconsize, numBarbs, i; - BG_unpackAmmoArray( ps->weapon, ps->ammo, ps->powerups, &numBarbs, NULL, NULL ); + BG_UnpackAmmoArray( ps->weapon, ps->ammo, ps->powerups, &numBarbs, NULL, NULL ); if( height > width ) { @@ -941,7 +941,7 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, vec4_t color ) break; default: - BG_unpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, &value, NULL, NULL ); + BG_UnpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, &value, NULL, NULL ); break; } @@ -977,7 +977,7 @@ CG_DrawHumanScanner */ static void CG_DrawHumanScanner( rectDef_t *rect, qhandle_t shader ) { - if( BG_gotItem( UP_HELMET, cg.snap->ps.stats ) ) + if( BG_InventoryContainsUpgrade( UP_HELMET, cg.snap->ps.stats ) ) CG_Scanner( rect, shader ); } @@ -1100,7 +1100,7 @@ static void CG_DrawPlayerClipsValue( rectDef_t *rect, vec4_t color ) break; default: - BG_unpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, NULL, &value, NULL ); + BG_UnpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, NULL, &value, NULL ); if( value > -1 ) { @@ -1393,7 +1393,7 @@ float CG_GetValue( int ownerDraw ) { int value; - BG_unpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, + BG_UnpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, &value, NULL, NULL ); return value; @@ -1404,7 +1404,7 @@ float CG_GetValue( int ownerDraw ) { int value; - BG_unpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, + BG_UnpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, NULL, &value, NULL ); return value; @@ -2169,7 +2169,7 @@ void CG_DrawWeaponIcon( rectDef_t *rect, vec4_t color ) cent = &cg_entities[ cg.snap->ps.clientNum ]; ps = &cg.snap->ps; - BG_unpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, &ammo, &clips, NULL ); + BG_UnpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, &ammo, &clips, NULL ); BG_FindAmmoForWeapon( cent->currentState.weapon, &maxAmmo, &maxClips, NULL ); // don't display if dead diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c index 5b6bfc3a..2a1ca0f4 100644 --- a/src/cgame/cg_players.c +++ b/src/cgame/cg_players.c @@ -2053,7 +2053,7 @@ void CG_Player( centity_t *cent ) //rotate lerpAngles to floor if( es->eFlags & EF_WALLCLIMB && - BG_rotateAxis( es->angles2, tempAxis, tempAxis2, qtrue, es->eFlags & EF_WALLCLIMBCEILING ) ) + BG_RotateAxis( es->angles2, tempAxis, tempAxis2, qtrue, es->eFlags & EF_WALLCLIMBCEILING ) ) AxisToAngles( tempAxis2, angles ); else VectorCopy( cent->lerpAngles, angles ); @@ -2072,7 +2072,7 @@ void CG_Player( centity_t *cent ) //rotate the legs axis to back to the wall if( es->eFlags & EF_WALLCLIMB && - BG_rotateAxis( es->angles2, legs.axis, tempAxis, qfalse, es->eFlags & EF_WALLCLIMBCEILING ) ) + BG_RotateAxis( es->angles2, legs.axis, tempAxis, qfalse, es->eFlags & EF_WALLCLIMBCEILING ) ) AxisCopy( tempAxis, legs.axis ); //smooth out WW transitions so the model doesn't hop around diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index a8844206..5cad60c3 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -546,13 +546,13 @@ static void CG_SetUIVars( void ) //determine what the player is carrying for( i = WP_NONE + 1; i < WP_NUM_WEAPONS; i++ ) { - if( BG_gotWeapon( i, cg.snap->ps.stats ) && + if( BG_InventoryContainsWeapon( i, cg.snap->ps.stats ) && BG_FindPurchasableForWeapon( i ) ) strcat( carriageCvar, va( "W%d ", i ) ); } for( i = UP_NONE + 1; i < UP_NUM_UPGRADES; i++ ) { - if( BG_gotItem( i, cg.snap->ps.stats ) ) + if( BG_InventoryContainsUpgrade( i, cg.snap->ps.stats ) ) strcat( carriageCvar, va( "U%d ", i ) ); } strcat( carriageCvar, "$" ); diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index d16d2f5f..2fc0d7f7 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1339,7 +1339,7 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ) cent = &cg_entities[ cg.snap->ps.clientNum ]; ps = &cg.snap->ps; - BG_unpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, &ammo, &clips, NULL ); + BG_UnpackAmmoArray( cent->currentState.weapon, ps->ammo, ps->powerups, &ammo, &clips, NULL ); BG_FindAmmoForWeapon( cent->currentState.weapon, &maxAmmo, &maxClips, NULL ); // don't display if dead @@ -1366,7 +1366,7 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ) for( i = WP_NONE + 1; i < WP_NUM_WEAPONS; i++ ) { - if( !BG_gotWeapon( i, cg.snap->ps.stats ) ) + if( !BG_InventoryContainsWeapon( i, cg.snap->ps.stats ) ) continue; if( i == cg.weaponSelect ) @@ -1379,7 +1379,7 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ) for( i = UP_NONE + 1; i < UP_NUM_UPGRADES; i++ ) { - if( !BG_gotItem( i, cg.snap->ps.stats ) ) + if( !BG_InventoryContainsUpgrade( i, cg.snap->ps.stats ) ) continue; if( i == cg.weaponSelect - 32 ) @@ -1439,7 +1439,7 @@ void CG_DrawItemSelectText( rectDef_t *rect, float scale, int textStyle ) if( cg.weaponSelect <= 32 ) { if( cg_weapons[ cg.weaponSelect ].registered && - BG_gotWeapon( cg.weaponSelect, cg.snap->ps.stats ) ) + BG_InventoryContainsWeapon( cg.weaponSelect, cg.snap->ps.stats ) ) { if( name = cg_weapons[ cg.weaponSelect ].humanName ) { @@ -1452,7 +1452,7 @@ void CG_DrawItemSelectText( rectDef_t *rect, float scale, int textStyle ) else if( cg.weaponSelect > 32 ) { if( cg_upgrades[ cg.weaponSelect - 32 ].registered && - BG_gotItem( cg.weaponSelect - 32, cg.snap->ps.stats ) ) + BG_InventoryContainsUpgrade( cg.weaponSelect - 32, cg.snap->ps.stats ) ) { if( name = cg_upgrades[ cg.weaponSelect - 32 ].humanName ) { @@ -1476,13 +1476,13 @@ static qboolean CG_WeaponSelectable( int i ) { int ammo, clips, maxclips; - BG_unpackAmmoArray( i, cg.snap->ps.ammo, cg.snap->ps.powerups, &ammo, &clips, &maxclips ); + BG_UnpackAmmoArray( i, cg.snap->ps.ammo, cg.snap->ps.powerups, &ammo, &clips, &maxclips ); //TA: this is a pain in the ass /* if( !ammo && !clips && !BG_FindInfinteAmmoForWeapon( i ) ) return qfalse;*/ - if( !BG_gotWeapon( i, cg.snap->ps.stats ) ) + if( !BG_InventoryContainsWeapon( i, cg.snap->ps.stats ) ) return qfalse; return qtrue; @@ -1496,7 +1496,7 @@ CG_UpgradeSelectable */ static qboolean CG_UpgradeSelectable( int i ) { - if( !BG_gotItem( i, cg.snap->ps.stats ) ) + if( !BG_InventoryContainsUpgrade( i, cg.snap->ps.stats ) ) return qfalse; return qtrue; @@ -1613,7 +1613,7 @@ void CG_Weapon_f( void ) cg.weaponSelectTime = cg.time; - if( !BG_gotWeapon( num, cg.snap->ps.stats ) ) + if( !BG_InventoryContainsWeapon( num, cg.snap->ps.stats ) ) return; // don't have the weapon cg.weaponSelect = num; |