From: bones_was_here Date: Mon, 10 Aug 2020 06:50:38 +0000 (+1000) Subject: Use readable labels for q3compat bits X-Git-Tag: xonotic-v0.8.5~352^2~51 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2bb086b294865802c8b01a6e8a407c6efa6b9f52;p=xonotic%2Fxonotic-data.pk3dir.git Use readable labels for q3compat bits --- diff --git a/qcsrc/common/mapobjects/trigger/multi.qc b/qcsrc/common/mapobjects/trigger/multi.qc index 407a75371..3887d7cac 100644 --- a/qcsrc/common/mapobjects/trigger/multi.qc +++ b/qcsrc/common/mapobjects/trigger/multi.qc @@ -167,7 +167,7 @@ spawnfunc(trigger_multiple) this.wait = 0; this.use = multi_use; - if(this.wait == -1 && (q3compat & BIT(1))) + if(this.wait == -1 && (q3compat & Q3COMPAT_DEFI)) 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 b1db26e82..99f2fbec0 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -42,11 +42,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 & Q3COMPAT_ARENA), ITEM_Bullets, ITEM_Shells) +SPAWNFUNC_WEAPON_COND(weapon_shotgun, (q3compat & Q3COMPAT_ARENA), 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 & Q3COMPAT_ARENA), ITEM_Shells, ITEM_Bullets) // GL -> Mortar SPAWNFUNC_ITEM(ammo_grenades, ITEM_Rockets) diff --git a/qcsrc/server/compat/quake3.qh b/qcsrc/server/compat/quake3.qh index 5d759e378..783044653 100644 --- a/qcsrc/server/compat/quake3.qh +++ b/qcsrc/server/compat/quake3.qh @@ -1,6 +1,9 @@ #pragma once int q3compat = 0; +#define Q3COMPAT_ARENA BIT(0) +#define Q3COMPAT_DEFI BIT(1) + bool DoesQ3ARemoveThisEntity(entity this); .int fragsfilter_cnt; diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 28c273a11..188317702 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -887,8 +887,8 @@ spawnfunc(worldspawn) MapInfo_Enumerate(); MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 1); - q3compat = BITSET(q3compat, BIT(0), fexists(strcat("scripts/", mapname, ".arena"))); - q3compat = BITSET(q3compat, BIT(1), fexists(strcat("scripts/", mapname, ".defi"))); + q3compat = BITSET(q3compat, Q3COMPAT_ARENA, fexists(strcat("scripts/", mapname, ".arena"))); + q3compat = BITSET(q3compat, Q3COMPAT_DEFI, fexists(strcat("scripts/", mapname, ".defi"))); if(whichpack(strcat("maps/", mapname, ".cfg")) != "") {