diff options
author | Tim Angus <tim@ngus.net> | 2009-10-03 11:42:48 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:16 +0000 |
commit | 50d9e8eab7934e0b76c04ef4a300f0fe93d4f7f5 (patch) | |
tree | fe963ef7588cb6086dab611d184e11d324048a65 /src/cgame/cg_main.c | |
parent | c37ba185e89c73bc33e9ac19ee840c5e5ed49bb3 (diff) |
* Replace reams of BG_Find* functions with: BG_Buildable, BG_Class, BG_Weapon,
BG_Upgrade
* Move "overrides/*" to "configs/" and remove all the overriden data from
bg_misc.c, instead requiring it to be in the cfg files
* Add cfg files to source control
* Clean up some naming and typing issues
Diffstat (limited to 'src/cgame/cg_main.c')
-rw-r--r-- | src/cgame/cg_main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 10769252..9dd1a953 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -465,13 +465,13 @@ static void CG_SetUIVars( void ) for( i = WP_NONE + 1; i < WP_NUM_WEAPONS; i++ ) { if( BG_InventoryContainsWeapon( i, cg.snap->ps.stats ) && - BG_FindPurchasableForWeapon( i ) ) + BG_Weapon( i )->purchasable ) strcat( carriageCvar, va( "W%d ", i ) ); } for( i = UP_NONE + 1; i < UP_NUM_UPGRADES; i++ ) { if( BG_InventoryContainsUpgrade( i, cg.snap->ps.stats ) && - BG_FindPurchasableForUpgrade( i ) ) + BG_Upgrade( i )->purchasable ) strcat( carriageCvar, va( "U%d ", i ) ); } strcat( carriageCvar, "$" ); @@ -984,8 +984,8 @@ static void CG_RegisterClients( void ) //precache all the models/sounds/etc for( i = PCL_NONE + 1; i < PCL_NUM_CLASSES; i++ ) { - CG_PrecacheClientInfo( i, BG_FindModelNameForClass( i ), - BG_FindSkinNameForClass( i ) ); + CG_PrecacheClientInfo( i, BG_ClassConfig( i )->modelName, + BG_ClassConfig( i )->skinName ); cg.charModelFraction = (float)i / (float)PCL_NUM_CLASSES; trap_UpdateScreen( ); @@ -1792,8 +1792,8 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum ) cgs.media.outlineShader = trap_R_RegisterShader( "outline" ); // load overrides - BG_InitClassOverrides( ); - BG_InitBuildableOverrides( ); + BG_InitClassConfigs( ); + BG_InitBuildableConfigs( ); BG_InitAllowedGameElements( ); // Dynamic memory |