Fix cgame warnings

This commit is contained in:
Tim Angus 2014-09-01 10:47:15 +01:00
parent 621a72e698
commit 4444202a41
7 changed files with 6 additions and 13 deletions

View file

@ -995,7 +995,7 @@ static void CG_DrawUpperRight(stereoFrame_t stereoFrame)
y = CG_DrawTimer( y );
}
if ( cg_drawAttacker.integer ) {
y = CG_DrawAttacker( y );
CG_DrawAttacker( y );
}
}
@ -1281,7 +1281,7 @@ static void CG_DrawLowerRight( void ) {
}
y = CG_DrawScores( y );
y = CG_DrawPowerups( y );
CG_DrawPowerups( y );
}
#endif // MISSIONPACK
@ -1334,7 +1334,7 @@ static void CG_DrawLowerLeft( void ) {
}
y = CG_DrawPickupItem( y );
CG_DrawPickupItem( y );
}
#endif // MISSIONPACK

View file

@ -350,7 +350,7 @@ static void CG_Item( centity_t *cent ) {
trap_R_AddRefEntityToScene(&ent);
#ifdef MISSIONPACK
if ( item->giType == IT_WEAPON && wi->barrelModel ) {
if ( item->giType == IT_WEAPON && wi && wi->barrelModel ) {
refEntity_t barrel;
memset( &barrel, 0, sizeof( barrel ) );

View file

@ -290,7 +290,6 @@ void CG_DrawInformation( void ) {
if ( value ) {
UI_DrawProportionalString( 320, y, va( "capturelimit %i", value ),
UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, colorWhite );
y += PROP_HEIGHT;
}
}
}

View file

@ -65,7 +65,7 @@ CG_FreeMarkPoly
==================
*/
void CG_FreeMarkPoly( markPoly_t *le ) {
if ( !le->prevMark ) {
if ( !le->prevMark || !le->nextMark ) {
CG_Error( "CG_FreeLocalEntity: not active" );
}

View file

@ -295,8 +295,6 @@ static void CG_DrawPlayerHead(rectDef_t *rect, qboolean draw2D) {
cg.headEndYaw = 180 + 20 * cos( crandom()*M_PI );
cg.headEndPitch = 5 * cos( crandom()*M_PI );
}
size = rect->w * 1.25;
}
// if the server was frozen for a while we may have a bad head start time
@ -510,8 +508,6 @@ static void CG_DrawSelectedPlayerPowerup( rectDef_t *rect, qboolean draw2D ) {
item = BG_FindItemForPowerup( j );
if (item) {
CG_DrawPic( x, y, rect->w, rect->h, trap_R_RegisterShader( item->icon ) );
x += 3;
y += 3;
return;
}
}

View file

@ -142,6 +142,7 @@ static void CG_TransitionSnapshot( void ) {
// if we had a map_restart, set everthing with initial
if ( !cg.snap ) {
return;
}
// clear the currentValid flag for all entities in the existing snapshot

View file

@ -1757,9 +1757,6 @@ void CG_MissileHitWall( int weapon, int clientNum, vec3_t origin, vec3_t dir, im
vec3_t sprOrg;
vec3_t sprVel;
mark = 0;
radius = 32;
sfx = 0;
mod = 0;
shader = 0;
light = 0;