From 3409e1ed18a2e0309184e7fee54e0a7e713dd237 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 2 Jul 2022 22:21:57 +1000 Subject: [PATCH] Some minor tweaks to the codebase to allow successful FTEQCC compilations --- qcsrc/client/hud/panel/strafehud.qc | 2 +- qcsrc/common/command/rpn.qc | 2 +- .../common/gamemodes/gamemode/domination/sv_domination.qc | 2 +- qcsrc/common/mapinfo.qc | 8 ++++---- .../xonotic/dialog_multiplayer_media_demo_timeconfirm.qc | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index e4e339c44..6ea836da1 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -539,7 +539,7 @@ void HUD_StrafeHUD() bool indicator_direction = direction < 0; // invert left/right when strafing backwards or when strafing towards the opposite side indicated by the direction variable // if both conditions are true then it's inverted twice hence not inverted at all - if(!fwd != odd_angles) + if((!fwd) != odd_angles) { indicator_direction = !indicator_direction; } diff --git a/qcsrc/common/command/rpn.qc b/qcsrc/common/command/rpn.qc index 7c944aa0f..99f96ff76 100644 --- a/qcsrc/common/command/rpn.qc +++ b/qcsrc/common/command/rpn.qc @@ -189,7 +189,7 @@ void GenericCommand_rpn(int request, int argc, string command) rpn_setf(rpn_getf() || f); } else if(rpncmd == "xor" || rpncmd == "^^") { f = rpn_popf(); - rpn_setf(!rpn_getf() != !f); + rpn_setf((!rpn_getf()) != !f); } else if(rpncmd == "bitnot") { rpn_setf(~rpn_popf()); } else if(rpncmd == "not") { diff --git a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc index 7d3a02bfd..be23f0428 100644 --- a/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc +++ b/qcsrc/common/gamemodes/gamemode/domination/sv_domination.qc @@ -294,7 +294,7 @@ void dom_controlpoint_setup(entity this) this.nextthink = time; settouch(this, dompointtouch); this.solid = SOLID_TRIGGER; - if(!this.flags & FL_ITEM) + if(!(this.flags & FL_ITEM)) IL_PUSH(g_items, this); this.flags = FL_ITEM; setsize(this, '-32 -32 -32', '32 32 32'); diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index c0b67ff4d..12744a079 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -761,7 +761,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet string fn; string s, t; float fh; - int f, i; + int i; float r, n, p; string acl; @@ -954,7 +954,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet } else { - t = car(s); s = cdr(s); f = stof(t); + t = car(s); s = cdr(s); float tf = stof(t); if(s != "") { if(WARN_COND) @@ -962,7 +962,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet } else { - if(a >= d || b >= e || c >= f) + if(a >= d || b >= e || c >= tf) { if(WARN_COND) LOG_WARN("Map ", pFilename, " contains an incorrect size line, mins have to be < maxs"); @@ -974,7 +974,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, int pAllowGenerate, Gamet MapInfo_Map_mins.z = c; MapInfo_Map_maxs.x = d; MapInfo_Map_maxs.y = e; - MapInfo_Map_maxs.z = f; + MapInfo_Map_maxs.z = tf; } } } diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc index 55760d14a..b9dccb8cb 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo_timeconfirm.qc @@ -4,7 +4,7 @@ #include "textlabel.qh" #include "button.qh" -void Handle_TimeDemo_Click(entity unused, entity unused) { demolist.timeDemo(demolist); } +void Handle_TimeDemo_Click(entity unused, entity me) { demolist.timeDemo(demolist); } void XonoticDemoTimeConfirmDialog_fill(entity me) { entity e; -- 2.39.2