From: FruitieX Date: Mon, 17 May 2010 18:03:35 +0000 (+0300) Subject: fix a bunch of warnings X-Git-Tag: xonotic-v0.1.0preview~541^2~147 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=a80dd58a063572d3644da0927693322cd3828524;p=xonotic%2Fxonotic-data.pk3dir.git fix a bunch of warnings --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index c6d03916b..4898f1f75 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -602,15 +602,15 @@ void GameCommand(string msg) } else if(cmd == "sendcvar") { // W_FixWeaponOrder will trash argv, so save what we need. - string cvar; - cvar = strzone(argv(1)); - s = cvar_string(cvar); - if(cvar == "cl_weaponpriority") + string thiscvar; + thiscvar = strzone(argv(1)); + s = cvar_string(thiscvar); + if(thiscvar == "cl_weaponpriority") s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 1); - else if(substring(cvar, 0, 17) == "cl_weaponpriority" && strlen(cvar) == 18) + else if(substring(thiscvar, 0, 17) == "cl_weaponpriority" && strlen(thiscvar) == 18) s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 0); - localcmd("cmd sentcvar ", cvar, " \"", s, "\"\n"); - strunzone(cvar); + localcmd("cmd sentcvar ", thiscvar, " \"", s, "\"\n"); + strunzone(thiscvar); } else if(cmd == "spawn") { s = argv(1); diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 676c1dbc8..4324d0e04 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -336,8 +336,6 @@ float TrueAimCheck() void CSQC_common_hud(void); -void CSQC_kh_hud(void); -void CSQC_ctf_hud(void); void PostInit(void); void CSQC_Demo_Camera(); float HUD_WouldDrawScoreboard (); @@ -966,6 +964,7 @@ void CSQC_SPIDER_HUD() #define raptor_g2 "gfx/vehicles/raptor_bombs.tga" #define raptor_s "gfx/vehicles/shiled.tga" +// these are causing warnings! #define spider_a1 "gfx/hud/sb_rocket.tga" #define spider_a2 "gfx/sb_bullets.tga" diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e21071da5..7c13b9a92 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -765,6 +765,8 @@ vector HUD_Panel_CheckResize(float id, vector myPos, vector mySize) vector targSize; vector myCenter; vector targCenter; + myCenter = '0 0 0'; // shut up fteqcc, there IS a reference + targCenter = '0 0 0'; // shut up fteqcc, there IS a reference for (i = 0; i < panel_cnt; ++i) { if(i == id || !HUD_Panel_CheckActive(i)) @@ -794,7 +796,6 @@ vector HUD_Panel_CheckResize(float id, vector myPos, vector mySize) targCenter_x = targPos_x + 0.5 * targSize_x; targCenter_y = targPos_y + 0.5 * targSize_y; - float k, y; if(myCenter_x < targCenter_x && myCenter_y < targCenter_y && resizeCorner != 1) // top left (of target panel) { if(myPos_x + mySize_x - targPos_x < myPos_y + mySize_y - targPos_y) // push it to the side @@ -885,6 +886,8 @@ vector HUD_Panel_CheckMove(float id, vector myPos, vector mySize) vector targSize; vector myCenter; vector targCenter; + myCenter = '0 0 0'; // shut up fteqcc, there IS a reference + targCenter = '0 0 0'; // shut up fteqcc, there IS a reference for (i = 0; i < panel_cnt; ++i) { if(i == id || !HUD_Panel_CheckActive(i)) @@ -911,7 +914,6 @@ vector HUD_Panel_CheckMove(float id, vector myPos, vector mySize) targCenter_x = targPos_x + 0.5 * targSize_x; targCenter_y = targPos_y + 0.5 * targSize_y; - float k, y; if(myCenter_x < targCenter_x && myCenter_y < targCenter_y) // top left (of the target panel) { if(myPos_x + mySize_x - targPos_x < myPos_y + mySize_y - targPos_y) // push it to the side @@ -1137,7 +1139,7 @@ void weaponorder_swap(float i, float j, entity pass) float weaponorder_cmp(float i, float j, entity pass) { - float d, ii, ij; + float d; d = mod(weaponorder[i].impulse + 9, 10) - mod(weaponorder[j].impulse + 9, 10); if(d) return d; @@ -1148,8 +1150,8 @@ float weaponorder_cmp(float i, float j, entity pass) void HUD_WeaponIcons() { float id = 0; - float alpha, height, accuracybar_height, stat_weapons; // "constants" - vector pos, mySize, mysize, mypos, accuracy_color; + float alpha, accuracybar_height, stat_weapons; // "constants" + vector pos, mySize, accuracy_color; float i, weapid, fade, weapon_stats, weapon_hit, weapon_damage, weapon_cnt; // variables pos = HUD_Panel_GetPos(id); @@ -1374,8 +1376,6 @@ void HUD_Inventory() // Powerups (#2) // -float shield_maxtime; -float strength_maxtime; void HUD_Powerups() { float id = 2; float stat_items; @@ -1641,7 +1641,7 @@ void HUD_HealthArmor(void) mySize -= '2 2 0' * padding; } - float armor, health, x; + float armor, health; armor = getstati(STAT_ARMOR); health = getstati(STAT_HEALTH); @@ -2243,7 +2243,7 @@ void HUD_Score() float score, distribution, leader; float score_len, distr_len; - vector score_pos, secondary_score_pos, distribution_color; + vector distribution_color; entity tm, pl, me; me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1]; @@ -2855,7 +2855,6 @@ void HUD_Mod_NexBall(vector pos, vector mySize) //Manage the progress bar if any if (nb_pb_starttime > 0) { - vector s; dt = mod(time - nb_pb_starttime, nb_pb_period); // one period of positive triangle p = 2 * dt / nb_pb_period;