]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/compat/quake3.qc
Merge branch 'master' into bones_was_here/q3compat
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / compat / quake3.qc
index ee8530796e8f2f552786b76940edec1fe4a755a2..11b9f7188c8164661655a79b4e658295fe9bd621 100644 (file)
@@ -2,9 +2,10 @@
 
 #include <server/defs.qh>
 #include <server/miscfunctions.qh>
-#include <server/items.qh>
+#include <server/items/items.qh>
+#include <server/items/spawning.qh>
 #include <server/resources.qh>
-#include <common/t_items.qh>
+#include <common/gamemodes/_mod.qh>
 #include <common/gamemodes/gamemode/ctf/sv_ctf.qh>
 #include <common/mapobjects/triggers.qh>
 #include <common/mapobjects/trigger/counter.qh>
 */
 
 // 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)
@@ -57,7 +58,7 @@ SPAWNFUNC_WEAPON(weapon_chaingun, WEP_HLAC)
 SPAWNFUNC_ITEM(ammo_belt, ITEM_Cells)
 
 // Team Arena Nailgun -> Crylink || Quake Nailgun -> Electro
-SPAWNFUNC_WEAPON_COND(weapon_nailgun, cvar_string("sv_mapformat_is_quake3"), WEP_CRYLINK, WEP_ELECTRO)
+SPAWNFUNC_WEAPON_COND(weapon_nailgun, cvar("sv_mapformat_is_quake3"), WEP_CRYLINK, WEP_ELECTRO)
 SPAWNFUNC_ITEM(ammo_nails, ITEM_Cells)
 
 // LG -> Electro
@@ -86,6 +87,9 @@ SPAWNFUNC_ITEM(ammo_rockets, ITEM_Rockets)
 SPAWNFUNC_ITEM(item_armor_body, ITEM_ArmorMega)
 SPAWNFUNC_ITEM(item_armor_combat, ITEM_ArmorBig)
 SPAWNFUNC_ITEM(item_armor_shard, ITEM_ArmorSmall)
+SPAWNFUNC_ITEM(item_armor_green, ITEM_ArmorMedium) // CCTF
+
+// Battle Suit
 SPAWNFUNC_ITEM(item_enviro, ITEM_Shield)
 
 // medkit -> armor (we have no holdables)
@@ -314,7 +318,7 @@ bool DoesQ3ARemoveThisEntity(entity this)
        if(this.gametype)
        {
                string gametypename;
-               // static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"}
+               // From ioq3 g_spawn.c: static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester"};
                gametypename = "ffa";
                if(teamplay)
                        gametypename = "team";
@@ -326,7 +330,7 @@ bool DoesQ3ARemoveThisEntity(entity this)
                        gametypename = "tournament";
                if(maxclients == 1)
                        gametypename = "single";
-               // we do not have the other types (obelisk, harvester, teamtournament)
+               // we do not have the other types (obelisk, harvester)
                if(strstrofs(this.gametype, gametypename, 0) < 0)
                        return true;
        }