summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_draw.c17
-rw-r--r--src/cgame/cg_ents.c3
-rw-r--r--src/cgame/cg_playerstate.c5
-rw-r--r--src/cgame/cg_predict.c6
-rw-r--r--src/cgame/cg_view.c9
-rw-r--r--src/cgame/cg_weapons.c5
-rw-r--r--src/ui/ui_main.c3
-rw-r--r--src/ui/ui_shared.c19
8 files changed, 12 insertions, 55 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( &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 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;
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index 8eaa77c..052ee23 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -5562,7 +5562,6 @@ UI_Init
*/
void _UI_Init( qboolean inGameLoad ) {
const char *menuSet;
- int start;
BG_InitClassOverrides( );
BG_InitAllowedGameElements( );
@@ -5648,8 +5647,6 @@ void _UI_Init( qboolean inGameLoad ) {
AssetCache();
- start = trap_Milliseconds();
-
uiInfo.teamCount = 0;
uiInfo.characterCount = 0;
uiInfo.aliasCount = 0;
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index 6774742..f63a9fd 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -1549,12 +1549,9 @@ int Item_Slider_OverSlider(itemDef_t *item, float x, float y) {
int Item_ListBox_OverLB(itemDef_t *item, float x, float y) {
rectDef_t r;
- listBoxDef_t *listPtr;
int thumbstart;
- int count;
- count = DC->feederCount(item->special);
- listPtr = (listBoxDef_t*)item->typeData;
+ DC->feederCount(item->special);
if (item->window.flags & WINDOW_HORIZONTAL) {
// check if on left arrow
r.x = item->window.rect.x;
@@ -3644,11 +3641,9 @@ void BindingFromName(const char *cvar) {
void Item_Slider_Paint(itemDef_t *item) {
vec4_t newColor;
- float x, y, value;
+ float x, y;
menuDef_t *parent = (menuDef_t*)item->parent;
- value = (item->cvar) ? DC->getCVarValue(item->cvar) : 0;
-
if (item->window.flags & WINDOW_HASFOCUS) {
/* lowLight[0] = 0.8 * parent->focusColor[0];
lowLight[1] = 0.8 * parent->focusColor[1];
@@ -3677,7 +3672,8 @@ void Item_Slider_Paint(itemDef_t *item) {
}
void Item_Bind_Paint(itemDef_t *item) {
- vec4_t newColor, lowLight;
+ vec4_t newColor;
+ //vec4_t lowLight;
float value;
int maxChars = 0;
menuDef_t *parent = (menuDef_t*)item->parent;
@@ -3689,6 +3685,7 @@ void Item_Bind_Paint(itemDef_t *item) {
value = (item->cvar) ? DC->getCVarValue(item->cvar) : 0;
if (item->window.flags & WINDOW_HASFOCUS) {
+ /*
if (g_bindItem == item) {
lowLight[0] = 0.8f * 1.0f;
lowLight[1] = 0.8f * 0.0f;
@@ -3700,7 +3697,8 @@ void Item_Bind_Paint(itemDef_t *item) {
lowLight[2] = 0.8f * parent->focusColor[2];
lowLight[3] = 0.8f * parent->focusColor[3];
}
- /*LerpColor(parent->focusColor,lowLight,newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR));*/
+ LerpColor(parent->focusColor,lowLight,newColor,0.5+0.5*sin(DC->realTime / PULSE_DIVISOR));
+ */
//TA:
memcpy(newColor, &parent->focusColor, sizeof(vec4_t));
} else {
@@ -4099,12 +4097,9 @@ void Item_ListBox_Paint(itemDef_t *item) {
void Item_OwnerDraw_Paint(itemDef_t *item) {
- menuDef_t *parent;
-
if (item == NULL) {
return;
}
- parent = (menuDef_t*)item->parent;
if (DC->ownerDrawItem) {
vec4_t color, lowLight;