From: Rudolf Polzer Date: Sun, 31 Oct 2010 14:04:41 +0000 (+0100) Subject: fix variable declarations for subscopes X-Git-Tag: xonotic-v0.1.0preview~223 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9d59c02b0aef8f23222de3f54109cc2cd2b9a61d;p=xonotic%2Fxonotic-data.pk3dir.git fix variable declarations for subscopes --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 733bab0c1..1ef5bb5a1 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -358,6 +358,7 @@ void CSQC_UpdateView(float w, float h) float f, i, j; vector v, vo; vector vf_size, vf_min; + float a; vf_size = R_SetView3fv(VF_SIZE); vf_min = R_SetView3fv(VF_MIN); @@ -569,7 +570,6 @@ void CSQC_UpdateView(float w, float h) { // apply night vision effect vector rgb, tc_00, tc_01, tc_10, tc_11; - float a; if(!nightvision_noise) { diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 62abfce15..379b81075 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4948,6 +4948,8 @@ switch (id) {\ void HUD_Main (void) { + float i; + hud_skin_path = strcat("gfx/hud/", autocvar_hud_skin); // global hud alpha fade @@ -4974,7 +4976,6 @@ void HUD_Main (void) // HUD configure visible grid if(autocvar__hud_configure && autocvar_hud_configure_grid && autocvar_hud_configure_grid_alpha) { - float i; // x-axis for(i = 0; i < 1/bound(0.005, autocvar_hud_configure_grid_xsize, 0.2); ++i) { diff --git a/qcsrc/server/bot/scripting.qc b/qcsrc/server/bot/scripting.qc index 4d150fcca..196e3d7b6 100644 --- a/qcsrc/server/bot/scripting.qc +++ b/qcsrc/server/bot/scripting.qc @@ -101,7 +101,7 @@ entity bot_getplace(string placename) { e = find(world, targetname, placename); if(!e) - print("invalid place ", s, "\n"); + print("invalid place ", placename, "\n"); return e; } } diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index b587c166e..440c69bf3 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -266,7 +266,7 @@ void RaceCarPhysics() // using this move type for "big rigs" // the engine does not push the entity! - float accel, steer, f; + float accel, steer, f, myspeed, steerfactor; vector angles_save, rigvel; angles_save = self.angles; @@ -292,7 +292,7 @@ void RaceCarPhysics() if(self.flags & FL_ONGROUND || g_bugrigs_air_steering) { - float myspeed, upspeed, steerfactor, accelfactor; + float upspeed, accelfactor; myspeed = self.velocity * v_forward; upspeed = self.velocity * v_up; diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index b00c4b4fd..d890f5d59 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -858,6 +858,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f { string msgstr, colorstr, cmsgstr, namestr, fullmsgstr, sourcemsgstr, fullcmsgstr, sourcecmsgstr, privatemsgprefix; float flood, privatemsgprefixlen; + var .float flood_field; entity head; float ret; @@ -939,7 +940,6 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f float flood_spl; float flood_burst; float flood_lmax; - var .float flood_field; float lines; if(privatesay) { @@ -1001,10 +1001,10 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f else flood = 1; } - } - if (timeoutStatus == 2) //when game is paused, no flood protection - source.flood_field = flood = 0; + if (timeoutStatus == 2) //when game is paused, no flood protection + source.flood_field = flood = 0; + } if(flood == 2) // cannot happen for empty msgstr {