diff options
author | /dev/humancontroller <devhc@example.com> | 2017-04-13 11:30:00 +0000 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-04-15 17:24:16 +0200 |
commit | 997dca8b0297aa186931a84e9f9838b2867f7f1e (patch) | |
tree | d6d33dd19ac0a88df7f9bcad0d2508e3c48f02a8 /src/cgame | |
parent | c596670999d843b430df0c4fe0eeabd148614638 (diff) |
remove a bunch of set-but-otherwise-unused variables
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_draw.c | 17 | ||||
-rw-r--r-- | src/cgame/cg_ents.c | 3 | ||||
-rw-r--r-- | src/cgame/cg_playerstate.c | 5 | ||||
-rw-r--r-- | src/cgame/cg_predict.c | 6 | ||||
-rw-r--r-- | src/cgame/cg_view.c | 9 | ||||
-rw-r--r-- | src/cgame/cg_weapons.c | 5 |
6 files changed, 5 insertions, 40 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 1a3ecae..c5c9bf1 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -1907,12 +1907,11 @@ static void CG_DrawClock( rectDef_t *rect, float text_x, float text_y, char *s; int i, tx, w, totalWidth, strLength; qtime_t qt; - int t; if( !cg_drawClock.integer ) return; - t = trap_RealTime( &qt ); + trap_RealTime( &qt ); if( cg_drawClock.integer == 2 ) { @@ -2910,10 +2909,6 @@ CG_DrawLighting */ static void CG_DrawLighting( void ) { - centity_t *cent; - - cent = &cg_entities[ cg.snap->ps.clientNum ]; - //fade to black if stamina is low if( ( cg.snap->ps.stats[ STAT_STAMINA ] < -800 ) && ( cg.snap->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) ) @@ -3113,7 +3108,6 @@ static void CG_DrawTeamVote( void ) static qboolean CG_DrawScoreboard( void ) { static qboolean firstTime = qtrue; - float fade, *fadeColor; if( menuScoreboard ) menuScoreboard->window.flags &= ~WINDOW_FORCED; @@ -3125,13 +3119,8 @@ static qboolean CG_DrawScoreboard( void ) return qfalse; } - if( cg.showScores || - cg.predictedPlayerState.pm_type == PM_INTERMISSION ) - { - fade = 1.0; - fadeColor = colorWhite; - } - else + if( !cg.showScores && + cg.predictedPlayerState.pm_type != PM_INTERMISSION ) { cg.deferredPlayerLoading = 0; cg.killerName[ 0 ] = 0; diff --git a/src/cgame/cg_ents.c b/src/cgame/cg_ents.c index 17f1a7d..5802684 100644 --- a/src/cgame/cg_ents.c +++ b/src/cgame/cg_ents.c @@ -844,7 +844,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; if( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL ) { @@ -867,7 +867,6 @@ 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 ); VectorAdd( in, deltaOrigin, out ); diff --git a/src/cgame/cg_playerstate.c b/src/cgame/cg_playerstate.c index e1bcb09..7749f59 100644 --- a/src/cgame/cg_playerstate.c +++ b/src/cgame/cg_playerstate.c @@ -245,8 +245,6 @@ CG_CheckLocalSounds */ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) { - int reward; - // don't play the sounds if the player just changed teams if( ps->persistant[ PERS_TEAM ] != ops->persistant[ PERS_TEAM ] ) return; @@ -262,9 +260,6 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) // if we are going into the intermission, don't start any voices if( cg.intermissionStarted ) return; - - // reward sounds - reward = qfalse; } diff --git a/src/cgame/cg_predict.c b/src/cgame/cg_predict.c index 59419b5..0f95ea2 100644 --- a/src/cgame/cg_predict.c +++ b/src/cgame/cg_predict.c @@ -547,7 +547,6 @@ void CG_PredictPlayerState( void ) { int cmdNum, current, i; playerState_t oldPlayerState; - qboolean moved; usercmd_t oldestCmd; usercmd_t latestCmd; int stateIndex = 0, predictCmd = 0; @@ -733,9 +732,6 @@ void CG_PredictPlayerState( void ) stateIndex = cg.stateHead; } - // run cmds - moved = qfalse; - for( cmdNum = current - CMD_BACKUP + 1; cmdNum <= current; cmdNum++ ) { // get the command @@ -853,8 +849,6 @@ void CG_PredictPlayerState( void ) stateIndex = ( stateIndex + 1 ) % NUM_SAVED_STATES; } - moved = qtrue; - // add push trigger movement effects CG_TouchTriggerPrediction( ); diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index 477196c..1a13765 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -409,7 +409,7 @@ static void CG_OffsetFirstPersonView( void ) vec3_t predictedVelocity; int timeDelta; float bob2; - vec3_t normal, baseOrigin; + vec3_t normal; playerState_t *ps = &cg.predictedPlayerState; if( ps->stats[ STAT_STATE ] & SS_WALLCLIMBING ) @@ -429,8 +429,6 @@ static void CG_OffsetFirstPersonView( void ) origin = cg.refdef.vieworg; angles = cg.refdefViewAngles; - VectorCopy( origin, baseOrigin ); - // if dead, fix the angle and don't add any kick if( cg.snap->ps.stats[ STAT_HEALTH ] <= 0 ) { @@ -562,7 +560,6 @@ static void CG_OffsetFirstPersonView( void ) usercmd_t cmd; int cmdNum; float fFraction, rFraction, uFraction; - float fFraction2, rFraction2, uFraction2; cmdNum = trap_GetCurrentCmdNumber(); trap_GetUserCmd( cmdNum, &cmd ); @@ -580,10 +577,6 @@ static 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 ); - if( cmd.forwardmove > 0 ) VectorMA( origin, STRUGGLE_DIST * fFraction, forward, origin ); else if( cmd.forwardmove < 0 ) diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 135e441..600a776 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1159,14 +1159,9 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color ) int length; int selectWindow; qboolean vertical; - centity_t *cent; - playerState_t *ps; int colinfo[ 64 ]; - cent = &cg_entities[ cg.snap->ps.clientNum ]; - ps = &cg.snap->ps; - // don't display if dead if( cg.predictedPlayerState.stats[ STAT_HEALTH ] <= 0 ) return; |