From: TimePath Date: Sun, 25 Jan 2015 03:41:51 +0000 (+1100) Subject: Remove some `#ifdef GMQCC` conditionals X-Git-Tag: xonotic-v0.8.1~133^2~35 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c2bcf0db4a1d1460ef667f26c51efedfccfa6ba0;p=xonotic%2Fxonotic-data.pk3dir.git Remove some `#ifdef GMQCC` conditionals --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 308665dc4..33d7f9f5c 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2672,14 +2672,9 @@ float mod_active; // is there any active mod icon? void DrawCAItem(vector myPos, vector mySize, float aspect_ratio, int layout, float i) { - float stat; - string pic; - vector color; -#ifdef GMQCC - stat = -1; - pic = ""; - color = '0 0 0'; -#endif + float stat = -1; + string pic = ""; + vector color = '0 0 0'; switch(i) { case 0: @@ -3266,14 +3261,9 @@ void HUD_Mod_Race(vector pos, vector mySize) void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, float i) { - float stat, pps_ratio; - string pic; - vector color; -#ifdef GMQCC - stat = -1; - pic = ""; - color = '0 0 0'; -#endif + float stat = -1; + string pic = ""; + vector color = '0 0 0'; switch(i) { case 0: @@ -3298,7 +3288,7 @@ void DrawDomItem(vector myPos, vector mySize, float aspect_ratio, int layout, fl color = '1 0 1'; break; } - pps_ratio = stat / getstatf(STAT_DOM_TOTAL_PPS); + float pps_ratio = stat / getstatf(STAT_DOM_TOTAL_PPS); if(mySize_x/mySize_y > aspect_ratio) { diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 9a1cef278..e9b4ea03a 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -1289,19 +1289,12 @@ void HUD_DrawScoreboard() pos = HUD_Scoreboard_MakeTable(pos, tm, rgb, bg_size); } - -#ifdef GMQCC - rgb = '0 0 0'; -#endif rgb_x = autocvar_scoreboard_color_bg_r; rgb_y = autocvar_scoreboard_color_bg_g; rgb_z = autocvar_scoreboard_color_bg_b; } else { -#ifdef GMQCC - rgb = '0 0 0'; -#endif rgb_x = autocvar_scoreboard_color_bg_r; rgb_y = autocvar_scoreboard_color_bg_g; rgb_z = autocvar_scoreboard_color_bg_b; diff --git a/qcsrc/common/weapons/w_tuba.qc b/qcsrc/common/weapons/w_tuba.qc index e08cf676f..37f1e3868 100644 --- a/qcsrc/common/weapons/w_tuba.qc +++ b/qcsrc/common/weapons/w_tuba.qc @@ -184,16 +184,13 @@ void W_Tuba_NoteOff(void) float W_Tuba_GetNote(entity pl, float hittype) { - float note; - float movestate; - movestate = 5; - if(pl.movement_x < 0) movestate -= 3; - if(pl.movement_x > 0) movestate += 3; - if(pl.movement_y < 0) movestate -= 1; - if(pl.movement_y > 0) movestate += 1; -#ifdef GMQCC - note = 0; -#endif + float movestate = 5; + if (pl.movement_x < 0) movestate -= 3; + else if (pl.movement_x > 0) movestate += 3; + if (pl.movement_y < 0) movestate -= 1; + else if (pl.movement_y > 0) movestate += 1; + + float note = 0; switch(movestate) { // layout: originally I wanted diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index aa771649d..8a7d04193 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -318,9 +318,6 @@ void draw_Picture_Aligned(vector algn, float scalemode, string img, float a) isz_w = '1 0 0' + '0 1 0' * ((sz_y / sz_x) * (draw_scale_x / draw_scale_y)); isz_h = '0 1 0' + '1 0 0' * ((sz_x / sz_y) * (draw_scale_y / draw_scale_x)); -#ifdef GMQCC - isz = '0 0 0'; -#endif switch(scalemode) { default: diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index 7c8f6a319..88b4c7a03 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -1390,10 +1390,7 @@ void spawnfunc_target_items (void) else { error("invalid spawnflags"); -#ifdef GMQCC - itemprefix = string_null; - valueprefix = string_null; -#endif + itemprefix = valueprefix = string_null; } self.netname = ""; diff --git a/qcsrc/server/tturrets/system/system_aimprocs.qc b/qcsrc/server/tturrets/system/system_aimprocs.qc index c3dbe55a4..1901e4e25 100644 --- a/qcsrc/server/tturrets/system/system_aimprocs.qc +++ b/qcsrc/server/tturrets/system/system_aimprocs.qc @@ -11,7 +11,7 @@ vector turret_stdproc_aim_generic() { vector pre_pos, prep; - float distance, impact_time, i, mintime; + float distance, i, mintime; turret_tag_fire_update(); @@ -30,9 +30,7 @@ vector turret_stdproc_aim_generic() { // FIXME: this cant be the best way to do this.. prep = pre_pos; -#ifdef GMQCC - impact_time = 0; -#endif + float impact_time = 0; for(i = 0; i < 4; ++i) { distance = vlen(prep - self.tur_shotorg); diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index d25c769b0..4b18d381b 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -570,9 +570,7 @@ void WarpZone_InitStep_UpdateTransform() norm = normalize(norm); } -#ifdef GMQCC ang = '0 0 0'; -#endif if(self.aiment) { org = self.aiment.origin;