From 50d9e8eab7934e0b76c04ef4a300f0fe93d4f7f5 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 3 Oct 2009 11:42:48 +0000 Subject: * 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 --- src/cgame/cg_view.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cgame/cg_view.c') diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index 15b9bc06..7d4693a8 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -353,7 +353,7 @@ static void CG_StepOffset( void ) BG_GetClientNormal( ps, normal ); - steptime = BG_FindSteptimeForClass( ps->stats[ STAT_CLASS ] ); + steptime = BG_Class( ps->stats[ STAT_CLASS ] )->steptime; // smooth out stair climbing timeDelta = cg.time - cg.stepTime; @@ -460,7 +460,7 @@ static void CG_OffsetFirstPersonView( void ) if( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT ) bob2 = 0.0f; else - bob2 = BG_FindBobForClass( cg.predictedPlayerState.stats[ STAT_CLASS ] ); + bob2 = BG_Class( cg.predictedPlayerState.stats[ STAT_CLASS ] )->bob; #define LEVEL4_FEEDBACK 10.0f @@ -699,7 +699,7 @@ static int CG_CalcFov( void ) else { // don't lock the fov globally - we need to be able to change it - attribFov = BG_FindFovForClass( cg.predictedPlayerState.stats[ STAT_CLASS ] ); + attribFov = BG_Class( cg.predictedPlayerState.stats[ STAT_CLASS ] )->fov; fov_x = attribFov; if ( fov_x < 1 ) @@ -721,7 +721,7 @@ static int CG_CalcFov( void ) } // account for zooms - zoomFov = BG_FindZoomFovForWeapon( cg.predictedPlayerState.weapon ); + zoomFov = BG_Weapon( cg.predictedPlayerState.weapon )->zoomFov; if ( zoomFov < 1 ) zoomFov = 1; else if ( zoomFov > attribFov ) @@ -729,7 +729,7 @@ static int CG_CalcFov( void ) // only do all the zoom stuff if the client CAN zoom // FIXME: zoom control is currently hard coded to BUTTON_ATTACK2 - if( BG_WeaponCanZoom( cg.predictedPlayerState.weapon ) ) + if( BG_Weapon( cg.predictedPlayerState.weapon )->canZoom ) { if ( cg.zoomed ) { -- cgit