diff --git a/code/cgame/cg_draw.c b/code/cgame/cg_draw.c index aa22657a..178c9679 100644 --- a/code/cgame/cg_draw.c +++ b/code/cgame/cg_draw.c @@ -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 diff --git a/code/cgame/cg_ents.c b/code/cgame/cg_ents.c index 484bce13..356196e8 100644 --- a/code/cgame/cg_ents.c +++ b/code/cgame/cg_ents.c @@ -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 ) ); diff --git a/code/cgame/cg_info.c b/code/cgame/cg_info.c index 1bf23ec1..cda9027a 100644 --- a/code/cgame/cg_info.c +++ b/code/cgame/cg_info.c @@ -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; } } } diff --git a/code/cgame/cg_marks.c b/code/cgame/cg_marks.c index e29f4c9b..f219a983 100644 --- a/code/cgame/cg_marks.c +++ b/code/cgame/cg_marks.c @@ -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" ); } diff --git a/code/cgame/cg_newdraw.c b/code/cgame/cg_newdraw.c index d0028d67..986a40d2 100644 --- a/code/cgame/cg_newdraw.c +++ b/code/cgame/cg_newdraw.c @@ -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; } } diff --git a/code/cgame/cg_snapshot.c b/code/cgame/cg_snapshot.c index 1bf8970d..a2e018db 100644 --- a/code/cgame/cg_snapshot.c +++ b/code/cgame/cg_snapshot.c @@ -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 diff --git a/code/cgame/cg_weapons.c b/code/cgame/cg_weapons.c index a2b83252..0ce33d0c 100644 --- a/code/cgame/cg_weapons.c +++ b/code/cgame/cg_weapons.c @@ -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;