From: Mario Date: Sat, 2 Jul 2022 12:21:57 +0000 (+1000) Subject: Some minor tweaks to the codebase to allow successful FTEQCC compilations X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3409e1ed18a2e0309184e7fee54e0a7e713dd237;p=xonotic%2Fxonotic-data.pk3dir.git Some minor tweaks to the codebase to allow successful FTEQCC compilations --- 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;