diff options
author | Mikko Tiusanen <ams@daug.net> | 2015-01-25 23:47:16 +0200 |
---|---|---|
committer | Mikko Tiusanen <ams@daug.net> | 2015-01-25 23:47:16 +0200 |
commit | 56382169c394bc6a1e63a91fdd59b58ac3974986 (patch) | |
tree | ca7b9e762d4dfc7a11bc01e7dcbe072f465dc343 /src/cgame | |
parent | 67948a489d2a07b94b6d5a3eeb2b642146865a61 (diff) |
Fixed compiler warnings in all game, cgame sources.
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_buildable.c | 6 | ||||
-rw-r--r-- | src/cgame/cg_draw.c | 36 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_event.c | 2 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
-rw-r--r-- | src/cgame/cg_playerstate.c | 4 | ||||
-rw-r--r-- | src/cgame/cg_predict.c | 6 | ||||
-rw-r--r-- | src/cgame/cg_view.c | 12 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 4 |
9 files changed, 38 insertions, 38 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 909615f..5ecdafb 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -75,12 +75,12 @@ void CG_AlienBuildableExplosion( vec3_t origin, vec3_t dir, int buildable ) /* =================== -CG_AlienSPITEFUL_ABCESSExplosion +CG_AlienSpitefulAbcessExplosion Generated a bunch of gibs launching out from a location =================== */ -void CG_AlienSPITEFUL_ABCESSExplosion( vec3_t origin, vec3_t dir ) +void CG_AlienSpitefulAbcessExplosion( vec3_t origin, vec3_t dir ) { particleSystem_t *ps; @@ -141,7 +141,7 @@ static void CG_Creep( centity_t *cent ) vec3_t temp, origin; int scaleUpTime = BG_Buildable( cent->currentState.modelindex )->buildTime; int time; - int creepSize; + // int creepSize; time = cent->currentState.time; //should the creep be growing or receding? diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 8e0b88f..e3af715 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -501,12 +501,12 @@ static void CG_DrawPlayerBuildTimerRing( rectDef_t *rect, vec4_t backColor, vec4_t foreColor, qhandle_t shader ) { playerState_t *ps = &cg.snap->ps; - centity_t *cent; + // centity_t *cent; float buildTime = ps->stats[ STAT_MISC ]; float progress; vec4_t color; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; if( buildTime > MAXIMUM_BUILD_TIME ) buildTime = MAXIMUM_BUILD_TIME; @@ -887,7 +887,7 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, vec4_t color ) { float tx, ty; char *text; - int len; + // int len; trap_R_SetColor( color ); if( !bp ) @@ -921,7 +921,7 @@ static void CG_DrawPlayerAmmoValue( rectDef_t *rect, vec4_t color ) { float tx, ty; char *text; - int len; + // int len; trap_R_SetColor( color ); if( !bp ) @@ -1434,11 +1434,11 @@ static void CG_DrawLevelShot( rectDef_t *rect ) static void CG_DrawEdgeShot( rectDef_t *rect ) { - const char *info; + // const char *info; qhandle_t pic; - info = CG_ConfigString( CS_SERVERINFO ); + // info = CG_ConfigString( CS_SERVERINFO ); pic = trap_R_RegisterShaderNoMip( "ui/assets/warp_splash" ); trap_R_SetColor( NULL ); @@ -1552,11 +1552,11 @@ void CG_DrawLoadingScreen( void ) float CG_GetValue( int ownerDraw ) { - centity_t *cent; + // centity_t *cent; playerState_t *ps; weapon_t weapon; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; ps = &cg.snap->ps; weapon = BG_GetPlayerWeapon( ps ); @@ -2290,12 +2290,12 @@ static void CG_DrawClock( rectDef_t *rect, float text_x, float text_y, int i, strLength; float w, h, totalWidth; qtime_t qt; - int t; + // int t; if( !cg_drawClock.integer ) return; - t = trap_RealTime( &qt ); + /*t = */trap_RealTime( &qt ); if( cg_drawClock.integer == 2 ) { @@ -2819,11 +2819,11 @@ CG_DrawWeaponIcon void CG_DrawWeaponIcon( rectDef_t *rect, vec4_t color ) { int maxAmmo; - centity_t *cent; + // centity_t *cent; playerState_t *ps; weapon_t weapon; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; ps = &cg.snap->ps; weapon = BG_GetPlayerWeapon( ps ); @@ -2898,7 +2898,7 @@ static void CG_DrawCrosshair( rectDef_t *rect, vec4_t color ) float x, y; weaponInfo_t *wi; weapon_t weapon; - weapon_t curWeapon = WP_NONE; + // weapon_t curWeapon = WP_NONE; weapon = BG_GetPlayerWeapon( &cg.snap->ps ); @@ -3469,9 +3469,9 @@ CG_DrawLighting */ static void CG_DrawLighting( void ) { - centity_t *cent; + // centity_t *cent; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; //fade to black if stamina is low if( ( cg.snap->ps.stats[ STAT_STAMINA ] < STAMINA_BLACKOUT_LEVEL ) && @@ -3671,7 +3671,7 @@ static void CG_DrawVote( team_t team ) static qboolean CG_DrawScoreboard( void ) { static qboolean firstTime = qtrue; - float fade, *fadeColor; + // float fade, *fadeColor; if( menuScoreboard ) menuScoreboard->window.flags &= ~WINDOW_FORCED; @@ -3686,8 +3686,8 @@ static qboolean CG_DrawScoreboard( void ) if( cg.showScores || cg.predictedPlayerState.pm_type == PM_INTERMISSION ) { - fade = 1.0; - fadeColor = colorWhite; + // fade = 1.0; + // fadeColor = colorWhite; } else { diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 7b27579..a9663ad 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -836,7 +836,7 @@ void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int { centity_t *cent; vec3_t oldOrigin, origin, deltaOrigin; - vec3_t oldAngles, angles, deltaAngles; + vec3_t oldAngles, angles/*, deltaAngles*/; if( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) { @@ -859,7 +859,7 @@ void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int BG_EvaluateTrajectory( ¢->currentState.apos, toTime, angles ); VectorSubtract( origin, oldOrigin, deltaOrigin ); - VectorSubtract( angles, oldAngles, deltaAngles ); + // VectorSubtract( angles, oldAngles, deltaAngles ); VectorAdd( in, deltaOrigin, out ); diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 4dc548f..8ebb5af 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -1024,7 +1024,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) CG_AlienBuildableExplosion( position, dir, es->modelindex ); if ( es->modelindex == BA_A_SPITEFUL_ABCESS ) - CG_AlienSPITEFUL_ABCESSExplosion( position, dir ); + CG_AlienSpitefulAbcessExplosion( position, dir ); CG_InduceViewQuake( position, BUILDABLE_EXPLOSION_QUAKE ); break; diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index ab3e9e6..5816a9b 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1726,7 +1726,7 @@ void CG_DrawBuildableStatus( void ); void CG_InitBuildables( void ); void CG_HumanBuildableExplosion( vec3_t origin, vec3_t dir, int buildable ); void CG_AlienBuildableExplosion( vec3_t origin, vec3_t dir, int buildable ); - +void CG_AlienSpitefulAbcessExplosion( vec3_t origin, vec3_t dir ); void CG_DrawChatBubble( void ); int CG_SortDistance( const void *a, const void *b ); diff --git a/src/cgame/cg_playerstate.c b/src/cgame/cg_playerstate.c index 8a8e739..a6cd2a3 100644 --- a/src/cgame/cg_playerstate.c +++ b/src/cgame/cg_playerstate.c @@ -245,7 +245,7 @@ CG_CheckLocalSounds */ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) { - int reward; + // int reward; // don't play the sounds if the player just spawned if( ps->persistant[ PERS_SPECSTATE ] != ops->persistant[ PERS_SPECSTATE ] ) @@ -264,7 +264,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) return; // reward sounds - reward = qfalse; + // reward = qfalse; } diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c index 5b29250..9baab8b 100644 --- a/src/cgame/cg_predict.c +++ b/src/cgame/cg_predict.c @@ -572,7 +572,7 @@ void CG_PredictPlayerState( void ) { int cmdNum, current, i; playerState_t oldPlayerState; - qboolean moved; + // qboolean moved; usercmd_t oldestCmd; usercmd_t latestCmd; int stateIndex = 0, predictCmd = 0; @@ -759,7 +759,7 @@ void CG_PredictPlayerState( void ) } // run cmds - moved = qfalse; + // moved = qfalse; for( cmdNum = current - CMD_BACKUP + 1; cmdNum <= current; cmdNum++ ) { @@ -878,7 +878,7 @@ void CG_PredictPlayerState( void ) stateIndex = ( stateIndex + 1 ) % NUM_SAVED_STATES; } - moved = qtrue; + // moved = qtrue; // add push trigger movement effects CG_TouchTriggerPrediction( ); diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index eb6e88d..1221fe9 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -579,7 +579,7 @@ void CG_OffsetFirstPersonView( void ) vec3_t predictedVelocity; int timeDelta; float bob2; - vec3_t normal, baseOrigin; + vec3_t normal/*, baseOrigin*/; playerState_t *ps = &cg.predictedPlayerState; BG_GetClientNormal( ps, normal ); @@ -590,7 +590,7 @@ void CG_OffsetFirstPersonView( void ) origin = cg.refdef.vieworg; angles = cg.refdefViewAngles; - VectorCopy( origin, baseOrigin ); + // VectorCopy( origin, baseOrigin ); // if dead, fix the angle and don't add any kick if( cg.snap->ps.stats[ STAT_HEALTH ] <= 0 ) @@ -738,7 +738,7 @@ void CG_OffsetFirstPersonView( void ) usercmd_t cmd; int cmdNum; float fFraction, rFraction, uFraction; - float fFraction2, rFraction2, uFraction2; + // float fFraction2, rFraction2, uFraction2; cmdNum = trap_GetCurrentCmdNumber(); trap_GetUserCmd( cmdNum, &cmd ); @@ -756,9 +756,9 @@ void CG_OffsetFirstPersonView( void ) if( uFraction > 1.0f ) uFraction = 1.0f; - fFraction2 = -sin( fFraction * M_PI / 2 ); - rFraction2 = -sin( rFraction * M_PI / 2 ); - uFraction2 = -sin( uFraction * M_PI / 2 ); + // fFraction2 = -sin( fFraction * M_PI / 2 ); + // rFraction2 = -sin( rFraction * M_PI / 2 ); + // uFraction2 = -sin( uFraction * M_PI / 2 ); if( cmd.forwardmove > 0 ) VectorMA( origin, STRUGGLE_DIST * fFraction, forward, origin ); diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 8e3b438..520d40a 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1478,10 +1478,10 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ) int numItems = 0, selectedItem = 0; int length; qboolean vertical; - centity_t *cent; + // centity_t *cent; playerState_t *ps; - cent = &cg_entities[ cg.snap->ps.clientNum ]; + // cent = &cg_entities[ cg.snap->ps.clientNum ]; ps = &cg.snap->ps; // don't display if dead |