summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2012-07-12 21:35:39 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:18:17 +0000
commit22f97fece2bce63f57e0b8fca275281429705c9c (patch)
treea989d666e918998aefcc7678d5d3784399dd756d /src/cgame
parent8d448680f5b3bcd2a67a3684308bb948e4d3ddad (diff)
* Fix a bunch of variable set but not used warnings
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_draw.c24
-rw-r--r--src/cgame/cg_ents.c3
-rw-r--r--src/cgame/cg_playerstate.c10
-rw-r--r--src/cgame/cg_predict.c6
-rw-r--r--src/cgame/cg_view.c9
-rw-r--r--src/cgame/cg_weapons.c2
6 files changed, 5 insertions, 49 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c
index 7268ec64..cc3ab830 100644
--- a/src/cgame/cg_draw.c
+++ b/src/cgame/cg_draw.c
@@ -503,13 +503,10 @@ 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;
float buildTime = ps->stats[ STAT_MISC ];
float progress;
vec4_t color;
- cent = &cg_entities[ cg.snap->ps.clientNum ];
-
if( buildTime > MAXIMUM_BUILD_TIME )
buildTime = MAXIMUM_BUILD_TIME;
@@ -1276,11 +1273,9 @@ void CG_DrawLoadingScreen( void )
float CG_GetValue( int ownerDraw )
{
- centity_t *cent;
playerState_t *ps;
weapon_t weapon;
- cent = &cg_entities[ cg.snap->ps.clientNum ];
ps = &cg.snap->ps;
weapon = BG_GetPlayerWeapon( ps );
@@ -1926,12 +1921,11 @@ 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;
if( !cg_drawClock.integer )
return;
- t = trap_RealTime( &qt );
+ trap_RealTime( &qt );
if( cg_drawClock.integer == 2 )
{
@@ -2455,11 +2449,9 @@ CG_DrawWeaponIcon
void CG_DrawWeaponIcon( rectDef_t *rect, vec4_t color )
{
int maxAmmo;
- centity_t *cent;
playerState_t *ps;
weapon_t weapon;
- cent = &cg_entities[ cg.snap->ps.clientNum ];
ps = &cg.snap->ps;
weapon = BG_GetPlayerWeapon( ps );
@@ -3067,10 +3059,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 ] < STAMINA_BLACKOUT_LEVEL ) &&
( cg.snap->ps.stats[ STAT_TEAM ] == TEAM_HUMANS ) )
@@ -3257,7 +3245,6 @@ static void CG_DrawVote( team_t team )
static qboolean CG_DrawScoreboard( void )
{
static qboolean firstTime = qtrue;
- float fade, *fadeColor;
if( menuScoreboard )
menuScoreboard->window.flags &= ~WINDOW_FORCED;
@@ -3269,13 +3256,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 7b27579a..9f9dbaee 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;
if( moverNum <= 0 || moverNum >= ENTITYNUM_MAX_NORMAL )
{
@@ -859,7 +859,6 @@ void CG_AdjustPositionForMover( const vec3_t in, int moverNum, int fromTime, int
BG_EvaluateTrajectory( &cent->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 8a8e739c..9d31b4ab 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 spawned
if( ps->persistant[ PERS_SPECSTATE ] != ops->persistant[ PERS_SPECSTATE ] )
return;
@@ -257,14 +255,6 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops )
if( ps->stats[ STAT_HEALTH ] > 0 )
CG_PainEvent( &cg.predictedPlayerEntity, ps->stats[ STAT_HEALTH ] );
}
-
-
- // 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 fa697e03..f3ae38ef 100644
--- a/src/cgame/cg_predict.c
+++ b/src/cgame/cg_predict.c
@@ -544,7 +544,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;
@@ -730,9 +729,6 @@ void CG_PredictPlayerState( void )
stateIndex = cg.stateHead;
}
- // run cmds
- moved = qfalse;
-
for( cmdNum = current - CMD_BACKUP + 1; cmdNum <= current; cmdNum++ )
{
// get the command
@@ -850,8 +846,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 823287d8..800a16ae 100644
--- a/src/cgame/cg_view.c
+++ b/src/cgame/cg_view.c
@@ -556,7 +556,7 @@ void CG_OffsetFirstPersonView( void )
vec3_t predictedVelocity;
int timeDelta;
float bob2;
- vec3_t normal, baseOrigin;
+ vec3_t normal;
playerState_t *ps = &cg.predictedPlayerState;
BG_GetClientNormal( ps, normal );
@@ -567,8 +567,6 @@ 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 )
{
@@ -696,7 +694,6 @@ void CG_OffsetFirstPersonView( void )
usercmd_t cmd;
int cmdNum;
float fFraction, rFraction, uFraction;
- float fFraction2, rFraction2, uFraction2;
cmdNum = trap_GetCurrentCmdNumber();
trap_GetUserCmd( cmdNum, &cmd );
@@ -714,10 +711,6 @@ 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 9fd6f04e..0d50e421 100644
--- a/src/cgame/cg_weapons.c
+++ b/src/cgame/cg_weapons.c
@@ -1395,10 +1395,8 @@ void CG_DrawItemSelect( rectDef_t *rect, vec4_t color )
int numItems = 0, selectedItem = 0;
int length;
qboolean vertical;
- centity_t *cent;
playerState_t *ps;
- cent = &cg_entities[ cg.snap->ps.clientNum ];
ps = &cg.snap->ps;
// don't display if dead