From: bones_was_here Date: Tue, 14 Jul 2020 12:55:44 +0000 (+1000) Subject: Add parentheses around q3compat BIT checks in case of QCC bugs X-Git-Tag: xonotic-v0.8.5~352^2~66 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=330c1b20814d288bed9c59199e32573b205e94c9;p=xonotic%2Fxonotic-data.pk3dir.git Add parentheses around q3compat BIT checks in case of QCC bugs --- diff --git a/qcsrc/common/mapobjects/trigger/multi.qc b/qcsrc/common/mapobjects/trigger/multi.qc index c087f071a..7a8c0be84 100644 --- a/qcsrc/common/mapobjects/trigger/multi.qc +++ b/qcsrc/common/mapobjects/trigger/multi.qc @@ -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; diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 23a54f6fb..0243a9409 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -39,11 +39,11 @@ */ // 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)