]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add parentheses around q3compat BIT checks in case of QCC bugs
authorbones_was_here <bones_was_here@yahoo.com.au>
Tue, 14 Jul 2020 12:55:44 +0000 (22:55 +1000)
committerbones_was_here <bones_was_here@yahoo.com.au>
Tue, 14 Jul 2020 12:55:44 +0000 (22:55 +1000)
qcsrc/common/mapobjects/trigger/multi.qc
qcsrc/server/compat/quake3.qc

index c087f071a3eeb2611713256f8e0429bfc59b0831..7a8c0be84c31961d0719efbf8850391b4cad50e6 100644 (file)
@@ -176,7 +176,7 @@ spawnfunc(trigger_multiple)
                this.wait = 0;
        this.use = multi_use;
 
-       if(this.wait == -1 && q3compat & BIT(1))
+       if(this.wait == -1 && (q3compat & BIT(1)))
                this.wait = 0.1; // compatibility for q3df: "instant" return
 
        EXACTTRIGGER_INIT;
index 23a54f6fb840582dce4b09119918531a08328eab..0243a940986555243a2e7ae3c36db0486575db8a 100644 (file)
 */
 
 // SG -> MG || SG
-SPAWNFUNC_ITEM_COND(ammo_shells, q3compat & BIT(0), ITEM_Bullets, ITEM_Shells)
-SPAWNFUNC_WEAPON_COND(weapon_shotgun, q3compat & BIT(0), WEP_MACHINEGUN, WEP_SHOTGUN)
+SPAWNFUNC_ITEM_COND(ammo_shells, (q3compat & BIT(0)), ITEM_Bullets, ITEM_Shells)
+SPAWNFUNC_WEAPON_COND(weapon_shotgun, (q3compat & BIT(0)), WEP_MACHINEGUN, WEP_SHOTGUN)
 
 // MG -> SG || MG
-SPAWNFUNC_ITEM_COND(ammo_bullets, q3compat & BIT(0), ITEM_Shells, ITEM_Bullets)
+SPAWNFUNC_ITEM_COND(ammo_bullets, (q3compat & BIT(0)), ITEM_Shells, ITEM_Bullets)
 
 // GL -> Mortar
 SPAWNFUNC_ITEM(ammo_grenades, ITEM_Rockets)