From df31b95e3aa186620e42192d1c6baa88055ff47d Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 6 Feb 2013 00:12:20 +0100 Subject: [PATCH] Remove compiler warnings --- qcsrc/client/hud.qc | 11 +++++++++-- qcsrc/server/mutators/gamemode_ca.qc | 4 ++-- qcsrc/server/mutators/gamemode_freezetag.qc | 2 +- qcsrc/server/round_handler.qc | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 095b0978b..4b06cbf01 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -3302,6 +3302,11 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, float layout, f float stat; string pic; vector color; +#ifdef GMQCC + stat = -1; + pic = ""; + color = '0 0 0'; +#endif switch(i) { case 0: @@ -3319,10 +3324,12 @@ void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, float layout, f pic = "player_yellow.tga"; color = '1 1 0'; break; + default: case 3: stat = getstati(STAT_PINKALIVE); pic = "player_pink.tga"; color = '1 0 1'; + break; } if(mySize_x/mySize_y > aspect_ratio) @@ -3352,7 +3359,7 @@ void HUD_Mod_CA(vector myPos, vector mySize) { mod_active = 1; // required in each mod function that always shows something entity tm; - float teams_count; + float teams_count = 0; for(tm = teams.sort_next; tm; tm = tm.sort_next) if(tm.team != COLOR_SPECTATOR) ++teams_count; @@ -3369,7 +3376,7 @@ void HUD_Mod_CA(vector myPos, vector mySize) columns = ceil(teams_count/rows); int i; - float row, column; + float row = 0, column = 0; for(i=0; i= 1) winner_team = COLOR_TEAM1; if(bluealive >= 1) @@ -129,7 +129,7 @@ float CA_CheckTeams() } if(prev_total_players != total_players) { - string teams_missing; + string teams_missing = ""; if(!redalive) teams_missing = strcat(teams_missing, ColoredTeamName(COLOR_TEAM1), ", "); if(!bluealive) teams_missing = strcat(teams_missing, ColoredTeamName(COLOR_TEAM2), ", "); if(ca_teams >= 3) diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index e29079b62..7b947faed 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -87,7 +87,7 @@ float freezetag_CheckTeams() float freezetag_getWinnerTeam() { - float winner_team; + float winner_team = 0; if(redalive >= 1) winner_team = COLOR_TEAM1; if(bluealive >= 1) diff --git a/qcsrc/server/round_handler.qc b/qcsrc/server/round_handler.qc index d94d9b9cd..96d3dc896 100644 --- a/qcsrc/server/round_handler.qc +++ b/qcsrc/server/round_handler.qc @@ -40,7 +40,7 @@ void round_handler_Think() self.cnt = 0; self.round_endtime = time + self.round_timelimit; self.nextthink = time; - if(self.roundStart != func_null) + if(self.roundStart) self.roundStart(); return; } -- 2.39.2