Merge branch 'master' into Mario/wepent_experimental
authorMario <mario@smbclan.net>
Tue, 27 Dec 2016 12:44:01 +0000 (22:44 +1000)
committerMario <mario@smbclan.net>
Tue, 27 Dec 2016 12:44:01 +0000 (22:44 +1000)
# Conflicts:
# qcsrc/server/weapons/weaponsystem.qc

27 files changed:
qcsrc/common/items/all.qh
qcsrc/common/items/inventory.qh
qcsrc/common/items/item.qh
qcsrc/common/t_items.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/menu/xonotic/credits.qc
qcsrc/server/_all.inc
qcsrc/server/_mod.inc
qcsrc/server/_mod.qh
qcsrc/server/compat/_mod.inc [new file with mode: 0644]
qcsrc/server/compat/_mod.qh [new file with mode: 0644]
qcsrc/server/compat/halflife.qc [new file with mode: 0644]
qcsrc/server/compat/halflife.qh [new file with mode: 0644]
qcsrc/server/compat/quake.qc [new file with mode: 0644]
qcsrc/server/compat/quake.qh [new file with mode: 0644]
qcsrc/server/compat/quake3.qc [new file with mode: 0644]
qcsrc/server/compat/quake3.qh [new file with mode: 0644]
qcsrc/server/compat/wop.qc [new file with mode: 0644]
qcsrc/server/compat/wop.qh [new file with mode: 0644]
qcsrc/server/mutators/mutator/gamemode_ctf.qc
qcsrc/server/t_halflife.qc [deleted file]
qcsrc/server/t_halflife.qh [deleted file]
qcsrc/server/t_quake.qc [deleted file]
qcsrc/server/t_quake.qh [deleted file]
qcsrc/server/t_quake3.qc [deleted file]
qcsrc/server/t_quake3.qh [deleted file]
qcsrc/server/weapons/weaponsystem.qc

index d377776cd554f0bc5c3b0467c755cf8fe641ad37..dc8cf21c020a6d06993f87281cc1dad98f29cbac 100644 (file)
@@ -4,7 +4,7 @@
 
 #include "item.qh"
 
-REGISTRY(Items, BITS(5))
+REGISTRY(Items, BITS(7))
 #define Items_from(i) _Items_from(i, NULL)
 REGISTER_REGISTRY(Items)
 #define REGISTER_ITEM(id, class) REGISTER(Items, ITEM, id, m_id, NEW(class))
index 811f716fb84bccad19e7cf9044c6f56ffafaa0d0..a022979a7065f7ee07c8cdfb0fc94c3ab9a0038a 100644 (file)
@@ -15,17 +15,33 @@ ENDCLASS(Inventory)
 
 REGISTER_NET_LINKED(ENT_CLIENT_INVENTORY)
 
+const int Inventory_groups_major = 16;
+const int Inventory_groups_minor = 8; // ceil(Items_MAX / Inventory_groups_major)
+
+#define G_MAJOR(id) (floor((id) / Inventory_groups_minor))
+#define G_MINOR(id) ((id) % Inventory_groups_minor)
+
 #ifdef CSQC
 NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew)
 {
     make_pure(this);
-    const int bits = ReadInt24_t();
-    FOREACH(Items, bits & BIT(it.m_id), {
-        .int fld = inv_items[it.m_id];
-        int prev = this.(fld);
-        int next = this.(fld) = ReadByte();
-        LOG_TRACEF("%s: %.0f -> %.0f", it.m_name, prev, next);
-    });
+    const int majorBits = ReadShort();
+    for (int i = 0; i < Inventory_groups_major; ++i) {
+        if (!(majorBits & BIT(i))) {
+            continue;
+        }
+        const int minorBits = ReadByte();
+        for (int j = 0; j < Inventory_groups_minor; ++j) {
+            if (!(minorBits & BIT(j))) {
+                continue;
+            }
+            const GameItem it = Items_from(Inventory_groups_minor * i + j);
+            .int fld = inv_items[it.m_id];
+            int prev = this.(fld);
+            int next = this.(fld) = ReadByte();
+            LOG_TRACEF("%s: %.0f -> %.0f", it.m_name, prev, next);
+        }
+    }
     return true;
 }
 #endif
@@ -34,22 +50,56 @@ NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew)
 void Inventory_Write(Inventory data)
 {
     if (!data) {
-        WriteInt24_t(MSG_ENTITY, 0);
+        WriteShort(MSG_ENTITY, 0);
         return;
     }
     TC(Inventory, data);
-    int bits = 0;
+
+    int majorBits = 0;
     FOREACH(Items, true, {
         .int fld = inv_items[it.m_id];
-        bits = BITSET(bits, BIT(it.m_id), data.inventory.(fld) != (data.inventory.(fld) = data.(fld)));
+        const bool changed = data.inventory.(fld) != data.(fld);
+        if (changed) {
+            majorBits = BITSET(majorBits, BIT(G_MAJOR(it.m_id)), true);
+        }
     });
-    WriteInt24_t(MSG_ENTITY, bits);
-    FOREACH(Items, bits & BIT(it.m_id), {
-        WriteByte(MSG_ENTITY, data.inv_items[it.m_id]);
+    WriteShort(MSG_ENTITY, majorBits);
+
+    int minorBits = 0;
+    int lastMaj = 0;
+    int maj = 0;
+    FOREACH(Items, majorBits & BIT(maj = G_MAJOR(it.m_id)), {
+        .int fld = inv_items[it.m_id];
+        const bool changed = data.inventory.(fld) != (data.inventory.(fld) = data.(fld));
+        if (changed) {
+            if (maj != lastMaj) {
+                lastMaj = maj;
+#define X() MACRO_BEGIN \
+    if (minorBits) { \
+        WriteByte(MSG_ENTITY, minorBits); \
+        for (int j = 0; j < Inventory_groups_minor; ++j) { \
+            if (!(minorBits & BIT(j))) { \
+                continue; \
+            } \
+            const GameItem it = Items_from(Inventory_groups_minor * maj + j); \
+            WriteByte(MSG_ENTITY, data.inv_items[it.m_id]); \
+        } \
+    } \
+MACRO_END
+                X();
+                minorBits = 0;
+            }
+            minorBits = BITSET(minorBits, BIT(G_MINOR(it.m_id)), true);
+        }
     });
+    X();
+#undef X
 }
 #endif
 
+#undef G_MAJOR
+#undef G_MINOR
+
 #ifdef SVQC
 bool Inventory_Send(Inventory this, Client to, int sf)
 {
index bac127059daa12c6db32695d90aea95cf22f28ff..f3aa0cec26b067f47244b96c4af521028b677991 100644 (file)
@@ -34,7 +34,6 @@ const int IT_SUPERWEAPON                              = BIT(21); // suit
 const int IT_STRENGTH                                  = BIT(22);
 
 // item masks
-const int IT_AMMO                              = IT_FUEL | IT_SHELLS | IT_NAILS | IT_ROCKETS | IT_CELLS | IT_PLASMA;
 const int IT_UNLIMITED_AMMO                    = IT_UNLIMITED_WEAPON_AMMO | IT_UNLIMITED_SUPERWEAPONS;
 const int IT_PICKUPMASK                        = IT_UNLIMITED_AMMO | IT_JETPACK | IT_FUEL_REGEN; // strength and invincible are handled separately
 
index f799ec6dbd1d6b33d220159bc0bbd4cf7342e035..82801228e964c4a063fdcd0290b46392f329f00c 100644 (file)
@@ -393,7 +393,7 @@ bool have_pickup_item(entity this)
                if(autocvar_g_pickup_items == 0)
                        return false;
                if(g_weaponarena)
-                       if(this.weapons || (this.items & IT_AMMO)) // no item or ammo pickups in weaponarena
+                       if(this.weapons || this.itemdef.instanceOfAmmo) // no item or ammo pickups in weaponarena
                                return false;
        }
        return true;
index ddad35d025e68e973f0b0520dc09a70a9cd17f94..5a2f05a4832219fdc3ed9c51a3238c79de625f49 100644 (file)
@@ -44,7 +44,7 @@ METHOD(HunterKillerAttack, wr_think, void(entity thiswep, entity actor, .entity
        }
 }
 
-bool hk_is_valid_target(entity this, entity e_target);
+bool hk_is_valid_target(entity this, entity proj, entity targ);
 void turret_hk_missile_think(entity this)
 {
     vector vu, vd, vf, vl, vr, ve;  // Vector (direction)
@@ -53,10 +53,7 @@ void turret_hk_missile_think(entity this)
     float lt_for;   // Length of Trace FORwrad
     float lt_seek;  // Length of Trace SEEK (left, right, up down)
     float pt_seek;  // Pitch of Trace SEEK (How mutch to angele left, right up, down trace towards v_forward)
-    vector pre_pos;
     float myspeed;
-    entity e;
-    float ad,edist;
 
     this.nextthink = time + this.ticrate;
 
@@ -69,19 +66,17 @@ void turret_hk_missile_think(entity this)
     // Pick the closest valid target.
     if (!this.enemy)
     {
-        e = findradius(this.origin, 5000);
-        while (e)
+        // in this case, the lighter check is to validate it first, and check distance if it is valid
+        IL_EACH(g_damagedbycontents, hk_is_valid_target(this.owner, this, it),
         {
-            if (hk_is_valid_target(this, e))
-            {
-                if (!this.enemy)
-                    this.enemy = e;
-                else
-                    if (vlen2(this.origin - e.origin) < vlen2(this.origin - this.enemy.origin))
-                        this.enemy = e;
-            }
-            e = e.chain;
-        }
+            if(vdist(it.origin, >, 5000))
+                continue;
+
+            if(!this.enemy)
+                this.enemy = it;
+            else if(vlen2(this.origin - it.origin) < vlen2(this.origin - this.enemy.origin))
+                this.enemy = it;
+        });
     }
 
     this.angles = vectoangles(this.velocity);
@@ -91,16 +86,15 @@ void turret_hk_missile_think(entity this)
 
     if (this.enemy)
     {
-        edist = vlen(this.origin - this.enemy.origin);
         // Close enougth to do decent damage?
-        if ( edist <= (this.owner.shot_radius * 0.25) )
+        if(vdist(this.origin - this.enemy.origin, <=, (this.owner.shot_radius * 0.25)))
         {
             turret_projectile_explode(this);
             return;
         }
 
         // Get data on enemy position
-        pre_pos = this.enemy.origin +
+        vector pre_pos = this.enemy.origin +
                   this.enemy.velocity *
                   min((vlen(this.enemy.origin - this.origin) / vlen(this.velocity)),0.5);
 
@@ -111,12 +105,11 @@ void turret_hk_missile_think(entity this)
     }
     else
     {
-    edist = 0;
-    ve = '0 0 0';
+        ve = '0 0 0';
         fe = 0;
     }
 
-    if ((fe != 1) || (this.enemy == NULL) || (edist > 1000))
+    if ((fe != 1) || (this.enemy == NULL) || vdist(this.origin - this.enemy.origin, >, 1000))
     {
         myspeed = vlen(this.velocity);
 
@@ -129,7 +122,7 @@ void turret_hk_missile_think(entity this)
         ff = trace_fraction;
 
         // Find angular offset
-        ad = vlen(vectoangles(normalize(this.enemy.origin - this.origin)) - this.angles);
+        float ad = vlen(vectoangles(normalize(this.enemy.origin - this.origin)) - this.angles);
 
         // To close to something, Slow down!
         if ( ((ff < 0.7) || (ad > 4)) && (myspeed > (autocvar_g_turrets_unit_hk_shot_speed)) )
@@ -224,7 +217,7 @@ void turret_hk_missile_think(entity this)
 
 #ifdef TURRET_DEBUG_HK
     //if(this.atime < time) {
-    if ((fe <= 0.99)||(edist > 1000))
+    if ((fe <= 0.99)||vdist(this.origin - this.enemy.origin, >, 1000))
     {
         te_lightning2(NULL,this.origin, this.origin + vr * lt_seek);
         te_lightning2(NULL,this.origin, this.origin + vl * lt_seek);
@@ -246,35 +239,39 @@ void turret_hk_missile_think(entity this)
     UpdateCSQCProjectile(this);
 }
 
-bool hk_is_valid_target(entity this, entity e_target)
+bool hk_is_valid_target(entity this, entity proj, entity targ)
 {
-    if (e_target == NULL)
+    if (!targ)
+        return false;
+
+    // we know for sure pure entities are bad targets
+    if(is_pure(targ))
         return false;
 
     // If only this was used more..
-    if (e_target.flags & FL_NOTARGET)
+    if (targ.flags & FL_NOTARGET)
         return false;
 
     // Cant touch this
-    if ((e_target.takedamage == DAMAGE_NO) || (e_target.health < 0))
+    if ((targ.takedamage == DAMAGE_NO) || (targ.health < 0))
         return false;
 
     // player
-    if (IS_CLIENT(e_target))
+    if (IS_PLAYER(targ))
     {
-        if (this.owner.target_select_playerbias < 0)
+        if (this.target_select_playerbias < 0)
             return false;
 
-        if (IS_DEAD(e_target))
+        if (IS_DEAD(targ))
             return false;
     }
 
     // Missile
-    if ((e_target.flags & FL_PROJECTILE) && (this.owner.target_select_missilebias < 0))
+    if ((targ.flags & FL_PROJECTILE) && (this.target_select_missilebias < 0))
         return false;
 
     // Team check
-    if ((e_target.team == this.owner.team) || (this.owner.team == e_target.owner.team))
+    if ((targ.team == this.team) || (this.team == targ.owner.team))
         return false;
 
     return true;
index 816120b074981c6f897763bd8550cfb5fc916203..a28b0863861891b8c6e9361916b628f4926c65ba 100644 (file)
                PERSON(Zac "Mario" Jardine) \
        NL() \
        TITLE(_("Extended Team")) \
+               PERSON(AllieWay) \
                PERSON(Antonio "terencehill" Piu) \
                PERSON(Archer) \
                PERSON(BuddyFriendGuy) \
                PERSON(Debugger) \
+               PERSON(Diomedes) \
+               PERSON(Freddy) \
                PERSON(GATTS) \
                PERSON(Halogene) \
                PERSON(IDWMaster) \
                PERSON(Jan "zykure" Behrens) \
                PERSON(JH0nny) \
-               PERSON(Luigi) \
+               PERSON(Jubilant) \
                PERSON(Łukasz "kuniu the frogg" Polek) \
+               PERSON(martin-t) \
                PERSON(Matthias "matthiaskrgr" Krüger) \
                PERSON(Mattia "Melanosuchus" Basaglia) \
                PERSON(MrBougo) \
        FUNCTION(_("Level Design")) \
                PERSON(Amadeusz "amade/proraide" Sławiński) \
                PERSON(Ben "MooKow" Banker) \
-               PERSON(Calinou) \
                PERSON(Cortez) \
                PERSON(Cuinn "Cuinnton" Herrick) \
                PERSON(Debugger) \
+               PERSON(Hugo "Calinou" Locurcio) \
                PERSON(Jakob "tZork" Markström Gröhn) \
                PERSON(Konrad "Justin" Slawinski) \
                PERSON(Maddin) \
                        PERSON(Mihail "meequz" Varantsou) \
                NL() \
                FUNCTION(_("Bulgarian")) \
+                       PERSON(Alexander "alex4o" Bonin) \
+                       PERSON(ifohancroft) \
                        PERSON(lokster) \
                        PERSON(set_killer) \
+                       PERSON(ubone) \
                NL() \
                FUNCTION(_("Chinese (China)")) \
-                       PERSON(Antonidas) \
                        PERSON(kalawore) \
                        PERSON(sapphireliu) \
                NL() \
+               FUNCTION(_("Chinese (Taiwan)")) \
+                       PERSON(Alisha) \
+                       PERSON(Armcoon) \
+                       PERSON(Jeff "s8321414" Huang) \
+               NL() \
+               FUNCTION(_("Cornish")) \
+                       PERSON(Nicky "nrowe" Rowe) \
+               NL() \
                FUNCTION(_("Czech")) \
                        PERSON(shogun assassin/woky) \
                        PERSON(Superovoce) \
                NL() \
                FUNCTION(_("Dutch")) \
                        PERSON(Alexander "freefang" van Dam) \
+                       PERSON(Jonathan "Jonakeys" van der Steege) \
                        PERSON(PinkRobot) \
                        PERSON(vegiburger) \
                NL() \
                FUNCTION(_("English (Australia)")) \
                        PERSON(Laurene "sunflowers" Albrand) \
+                       PERSON(Stuart "Cefiar" Young) \
                        PERSON(Zac "Mario" Jardine) \
                NL() \
                FUNCTION(_("Finnish")) \
+                       PERSON(Jonas "PowaTree" Sahlberg) \
                        PERSON(Henry "Exitium" Sanmark) \
                        PERSON(Rasmus "FruitieX" Eskola) \
                NL() \
                FUNCTION(_("French")) \
-                       PERSON(Calinou) \
+                       PERSON(Hugo "Calinou" Locurcio) \
+                       PERSON(Kim "coughingmouse" Lee) \
                        PERSON(Maxime "Taximus" Paradis) \
                        PERSON(RedGuff) \
+                       PERSON(Thomas "illwieckz" Debesse) \
                        PERSON(Yannick "SpiKe" Le Guen) \
                NL() \
                FUNCTION(_("German")) \
                        PERSON(Erik "Ablu" Schilling) \
                        PERSON(Jope "Sless" Withers) \
                        PERSON(Marvin "Mirio" Beck) \
+                       PERSON(Paul "Snapper") \
                        PERSON(Rudolf "divVerent" Polzer) \
+                       PERSON(Wuzzy) \
                        PERSON(Yepoleb) \
                NL() \
                FUNCTION(_("Greek")) \
                        PERSON(stdi) \
                        PERSON(XCostaX) \
                NL() \
+               FUNCTION(_("Kazakh")) \
+                       PERSON("Артем \"bystrov.arterm\" Быстров") \
+               NL() \
+               FUNCTION(_("Korean")) \
+                       PERSON(Jisoo "s6e9x" Lim) \
+                       PERSON(Kim "coughingmouse" Lee) \
+               NL() \
                FUNCTION(_("Polish")) \
                        PERSON(4m) \
                        PERSON(Alex "tiprogrammierer.alex" Progger) \
                        PERSON(Amadeusz "amade/proraide" Sławiński) \
+                       PERSON(Artur "artur9010" Motyka) \
+                       PERSON(Jakub "KubeQ11" Pędziszewski) \
                NL() \
                FUNCTION(_("Portuguese")) \
+                       PERSON(Ivan Paulos "greylica" Tomé) \
+                       PERSON(Jean Trindade "Muleke_Trairao" Pereira) \
                        PERSON(Ricardo Manuel "Hellgardia" da Cruz Coelho da Silva) \
                        PERSON(xXxCHAOTICxXx) \
                NL() \
                        PERSON(Adrian-Ciprian "adrian.tinjala" Tînjală) \
                        PERSON(BusterDBK) \
                        PERSON(Mircea "Taoki" Kitsune) \
+                       PERSON(Sorin "unic_sorin" Botirla) \
                        PERSON(Tudor "TropiKo" Ionel) \
                NL() \
                FUNCTION(_("Russian")) \
                        PERSON(Alex "alextalker7" Talker) \
                        PERSON(Alexandr "zrg") \
                        PERSON(Andrei "adem4ik" Stepanov) \
+                       PERSON(Andrey "dekrY" P.) \
                        PERSON(gravicappa) \
                        PERSON(Hot Dog) \
                        PERSON(Lord Canistra) \
                        PERSON(marcus256) \
                NL() \
                FUNCTION(_("Ukrainian")) \
+                       PERSON(Dmitro "Gamebot" Sokhin) \
                        PERSON(Oleh "BlaXpirit" Prypin) \
                        PERSON(Vasyl "Harmata" Melnyk) \
                        PERSON(Yuriy "herrniemand" Ackermann) \
index 3359f13b120f2e40178127ddef25c685ea2e5bea..95bf71531023a4864807c373a8d76fe84eb46013 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "bot/_mod.inc"
 #include "command/_mod.inc"
+#include "compat/_mod.inc"
 #include "mutators/_mod.inc"
 #include "pathlib/_mod.inc"
 #include "weapons/_mod.inc"
index 4ecc610c7d9184f8cf93a510f468297c080ed223..eb74529a64daf066777af19f3f5b27faae7b38e8 100644 (file)
@@ -30,6 +30,3 @@
 #endif
 #include <server/teamplay.qc>
 #include <server/tests.qc>
-#include <server/t_halflife.qc>
-#include <server/t_quake.qc>
-#include <server/t_quake3.qc>
index 8162606c7834c5c1103648ec2b7cb22977cf2c26..a0d160d57c31194100a4951913721c7449da2da3 100644 (file)
@@ -30,6 +30,3 @@
 #endif
 #include <server/teamplay.qh>
 #include <server/tests.qh>
-#include <server/t_halflife.qh>
-#include <server/t_quake.qh>
-#include <server/t_quake3.qh>
diff --git a/qcsrc/server/compat/_mod.inc b/qcsrc/server/compat/_mod.inc
new file mode 100644 (file)
index 0000000..69d031e
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include <server/compat/halflife.qc>
+#include <server/compat/quake.qc>
+#include <server/compat/quake3.qc>
+#include <server/compat/wop.qc>
diff --git a/qcsrc/server/compat/_mod.qh b/qcsrc/server/compat/_mod.qh
new file mode 100644 (file)
index 0000000..bd65858
--- /dev/null
@@ -0,0 +1,5 @@
+// generated file; do not modify
+#include <server/compat/halflife.qh>
+#include <server/compat/quake.qh>
+#include <server/compat/quake3.qh>
+#include <server/compat/wop.qh>
diff --git a/qcsrc/server/compat/halflife.qc b/qcsrc/server/compat/halflife.qc
new file mode 100644 (file)
index 0000000..74e5013
--- /dev/null
@@ -0,0 +1,35 @@
+#include "halflife.qh"
+.float  roomtype;
+.float  radius;
+.float  pitch;
+.float  renderamt;
+.float  rendermode;
+.vector rendercolor;
+
+spawnfunc(weapon_crossbow) {}
+spawnfunc(weapon_handgrenade) {}
+spawnfunc(ammo_crossbow) {}
+spawnfunc(ammo_9mmclip) {}
+spawnfunc(ammo_gaussclip) {}
+spawnfunc(weapon_rpg) {}
+spawnfunc(weapon_357) {}
+void ammo_ARgrenades() {}
+spawnfunc(item_battery) {}
+spawnfunc(ammo_rpgclip) {}
+void weapon_9mmAR() {}
+spawnfunc(weapon_tripmine) {}
+spawnfunc(weapon_snark) {}
+spawnfunc(ammo_buckshot) {}
+void ammo_9mmAR() {}
+spawnfunc(ammo_357) {}
+spawnfunc(weapon_gauss) {}
+spawnfunc(weapon_hornetgun) {}
+//spawnfunc(weapon_shotgun) {}
+spawnfunc(item_healthkit) {}
+spawnfunc(item_longjump) {}
+spawnfunc(item_antidote) {}
+spawnfunc(func_recharge) {}
+spawnfunc(info_node) {}
+spawnfunc(env_sound) {}
+spawnfunc(light_spot) {}
+spawnfunc(func_healthcharger) {}
diff --git a/qcsrc/server/compat/halflife.qh b/qcsrc/server/compat/halflife.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/server/compat/quake.qc b/qcsrc/server/compat/quake.qc
new file mode 100644 (file)
index 0000000..539042d
--- /dev/null
@@ -0,0 +1,30 @@
+#include "quake.qh"
+
+#include <common/weapons/_all.qh>
+
+spawnfunc(weapon_electro);
+spawnfunc(weapon_hagar);
+spawnfunc(weapon_machinegun);
+spawnfunc(item_bullets);
+spawnfunc(item_armor_mega);
+spawnfunc(item_health_mega);
+spawnfunc(item_health_medium);
+
+//***********************
+//QUAKE 1 ENTITIES - So people can play quake1 maps with the xonotic weapons
+//***********************
+spawnfunc(weapon_nailgun) {spawnfunc_weapon_electro(this);}
+spawnfunc(weapon_supernailgun) {spawnfunc_weapon_hagar(this);}
+spawnfunc(weapon_supershotgun) {spawnfunc_weapon_machinegun(this);}
+
+spawnfunc(item_spikes) {spawnfunc_item_bullets(this);}
+//spawnfunc(item_armor1) {spawnfunc_item_armor_medium(this);}  // FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard
+spawnfunc(item_armor2) {spawnfunc_item_armor_mega(this);}
+spawnfunc(item_armorInv) {spawnfunc_item_armor_mega(this);} // TODO: make sure we actually want this
+spawnfunc(item_health) {if (this.spawnflags & 2) spawnfunc_item_health_mega(this);else spawnfunc_item_health_medium(this);}
+
+//spawnfunc_item_spikes
+//spawnfunc_item_health
+
+
+
diff --git a/qcsrc/server/compat/quake.qh b/qcsrc/server/compat/quake.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc
new file mode 100644 (file)
index 0000000..1c53de3
--- /dev/null
@@ -0,0 +1,208 @@
+#include "quake3.qh"
+
+#include <common/weapons/_all.qh>
+
+spawnfunc(weapon_crylink);
+spawnfunc(weapon_electro);
+spawnfunc(weapon_hagar);
+spawnfunc(weapon_machinegun);
+spawnfunc(weapon_vortex);
+
+spawnfunc(target_items);
+
+spawnfunc(item_bullets);
+spawnfunc(item_cells);
+spawnfunc(item_rockets);
+spawnfunc(item_shells);
+
+spawnfunc(item_jetpack);
+
+spawnfunc(item_armor_big);
+spawnfunc(item_armor_mega);
+spawnfunc(item_armor_small);
+
+spawnfunc(item_health_medium);
+spawnfunc(item_health_mega);
+
+//***********************
+//QUAKE 3 ENTITIES - So people can play quake3 maps with the xonotic weapons
+//***********************
+
+// NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
+
+// SG -> SG
+spawnfunc(ammo_shells)         { spawnfunc_item_shells(this);         }
+
+// MG -> MG
+spawnfunc(ammo_bullets)        { spawnfunc_item_bullets(this);        }
+
+// GL -> Mortar
+spawnfunc(ammo_grenades)       { spawnfunc_item_rockets(this);        }
+
+// LG -> Lightning
+spawnfunc(weapon_lightning)    { spawnfunc_weapon_electro(this);      }
+spawnfunc(ammo_lightning)      { spawnfunc_item_cells(this);          }
+
+// Plasma -> Hagar
+spawnfunc(weapon_plasmagun)    { spawnfunc_weapon_hagar(this);        }
+spawnfunc(ammo_cells)          { spawnfunc_item_rockets(this);        }
+
+// Rail -> Vortex
+spawnfunc(weapon_railgun)      { spawnfunc_weapon_vortex(this);          }
+spawnfunc(ammo_slugs)          { spawnfunc_item_cells(this);          }
+
+// BFG -> Crylink
+spawnfunc(weapon_bfg)          { spawnfunc_weapon_crylink(this);      }
+spawnfunc(ammo_bfg)            { spawnfunc_item_cells(this);          }
+
+// RL -> RL
+spawnfunc(ammo_rockets)        { spawnfunc_item_rockets(this);        }
+
+// Armor
+spawnfunc(item_armor_body)     { spawnfunc_item_armor_mega(this);    }
+spawnfunc(item_armor_combat)   { spawnfunc_item_armor_big(this);      }
+spawnfunc(item_armor_shard)    { spawnfunc_item_armor_small(this);    }
+spawnfunc(item_enviro)         { spawnfunc_item_invincible(this);     }
+
+.float wait;
+.float delay;
+
+// weapon remove ent from df
+void target_init_verify(entity this)
+{
+       entity trigger, targ;
+       for(trigger = NULL; (trigger = find(trigger, classname, "trigger_multiple")); )
+               for(targ = NULL; (targ = find(targ, targetname, trigger.target)); )
+                       if (targ.classname == "target_init" || targ.classname == "target_give" || targ.classname == "target_items")
+                       {
+                               trigger.wait = 0;
+                               trigger.delay = 0;
+                               targ.wait = 0;
+                               targ.delay = 0;
+
+                               //setsize(targ, trigger.mins, trigger.maxs);
+                               //setorigin(targ, trigger.origin);
+                               //remove(trigger);
+                       }
+}
+
+spawnfunc(target_init)
+{
+       this.spawnflags = 0; // remove all weapons except the ones listed below
+       this.netname = "shotgun"; // keep these weapons through the remove trigger
+       spawnfunc_target_items(this);
+       InitializeEntity(this, target_init_verify, INITPRIO_FINDTARGET);
+}
+
+// weapon give ent from defrag
+void target_give_init(entity this)
+{
+       IL_EACH(g_items, it.targetname == this.target,
+       {
+               if (it.classname == "weapon_rocketlauncher" || it.classname == "weapon_devastator") {
+                       this.ammo_rockets += it.count * WEP_CVAR(devastator, ammo);
+                       this.netname = "devastator";
+               }
+               else if (it.classname == "weapon_plasmagun") {
+                       this.ammo_rockets += it.count * WEP_CVAR_PRI(hagar, ammo); // WEAPONTODO
+                       if(this.netname == "")
+                               this.netname = "hagar";
+                       else
+                               this.netname = strcat(this.netname, " hagar");
+               }
+               else if (it.classname == "weapon_bfg") {
+                       this.ammo_cells += it.count * WEP_CVAR_PRI(crylink, ammo);
+                       if(this.netname == "")
+                               this.netname = "crylink";
+                       else
+                               this.netname = strcat(this.netname, " crylink");
+               }
+               else if (it.classname == "weapon_grenadelauncher" || it.classname == "weapon_mortar") {
+                       this.ammo_rockets += it.count * WEP_CVAR_PRI(mortar, ammo); // WEAPONTODO
+                       if(this.netname == "")
+                               this.netname = "mortar";
+                       else
+                               this.netname = strcat(this.netname, " mortar");
+               }
+               else if (it.classname == "item_armor_body")
+                       this.armorvalue = 100;
+               else if (it.classname == "item_health_mega")
+                       this.health = 200;
+               //remove(it); // removing ents in init functions causes havoc, workaround:
+        setthink(it, SUB_Remove);
+        it.nextthink = time;
+       });
+       this.spawnflags = 2;
+       spawnfunc_target_items(this);
+       InitializeEntity(this, target_init_verify, INITPRIO_FINDTARGET);
+}
+
+spawnfunc(target_give)
+{
+       InitializeEntity(this, target_give_init, INITPRIO_FINDTARGET);
+}
+
+//spawnfunc(item_flight)       /* handled by jetpack */
+//spawnfunc(item_haste)        /* handled by buffs mutator */
+//spawnfunc(item_health)       /* handled in t_quake.qc */
+//spawnfunc(item_health_large) /* handled in t_items.qc */
+//spawnfunc(item_health_small) /* handled in t_items.qc */
+//spawnfunc(item_health_mega)  /* handled in t_items.qc */
+//spawnfunc(item_invis)        /* handled by buffs mutator */
+//spawnfunc(item_regen)        /* handled by buffs mutator */
+
+// CTF spawnfuncs handled in mutators/gamemode_ctf.qc now
+
+spawnfunc(item_flight)
+{
+       spawnfunc_item_jetpack(this);
+}
+
+.float notteam;
+.float notsingle;
+.float notfree;
+.float notq3a;
+.float notta;
+.string gametype;
+bool DoesQ3ARemoveThisEntity(entity this)
+{
+       // Q3 style filters (DO NOT USE, THIS IS COMPAT ONLY)
+
+       if(this.notq3a)
+               if(!teamplay || g_tdm || g_ctf)
+                       return true;
+
+       if(this.notta)
+               if (!(!teamplay || g_tdm || g_ctf))
+                       return true;
+
+       if(this.notsingle)
+               if(maxclients == 1)
+                       return true;
+
+       if(this.notteam)
+               if(teamplay)
+                       return true;
+
+       if(this.notfree)
+               if(!teamplay)
+                       return true;
+
+       if(this.gametype)
+       {
+               string gametypename;
+               // static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"}
+               gametypename = "ffa";
+               if(teamplay)
+                       gametypename = "team";
+               if(g_ctf)
+                       gametypename = "ctf";
+               if(maxclients == 1)
+                       gametypename = "single";
+               // we do not have the other types (oneflag, obelisk, harvester, teamtournament)
+               if(strstrofs(this.gametype, gametypename, 0) < 0)
+                       return true;
+       }
+
+       return false;
+}
diff --git a/qcsrc/server/compat/quake3.qh b/qcsrc/server/compat/quake3.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/qcsrc/server/compat/wop.qc b/qcsrc/server/compat/wop.qc
new file mode 100644 (file)
index 0000000..6d53e18
--- /dev/null
@@ -0,0 +1,62 @@
+#include "wop.qh"
+
+#include <common/weapons/_all.qh>
+// #include <server/mutators/gamemode.qh>
+
+spawnfunc(weapon_arc);
+spawnfunc(weapon_crylink);
+spawnfunc(weapon_electro);
+spawnfunc(weapon_mortar);
+spawnfunc(weapon_hagar);
+spawnfunc(weapon_machinegun);
+spawnfunc(weapon_devastator);
+spawnfunc(weapon_shotgun);
+spawnfunc(weapon_vortex);
+
+spawnfunc(item_armor_big);
+spawnfunc(item_armor_mega);
+spawnfunc(item_armor_small);
+
+spawnfunc(item_bullets);
+spawnfunc(item_cells);
+spawnfunc(item_quad);
+spawnfunc(item_rockets);
+spawnfunc(item_shells);
+
+spawnfunc(item_jetpack);
+
+spawnfunc(item_haste);
+spawnfunc(item_health_medium);
+spawnfunc(item_health_mega);
+spawnfunc(item_invis);
+spawnfunc(item_medic);
+
+//***********************
+//WORD OF PADMAN ENTITIES - So people can play wop maps with the xonotic weapons
+//***********************
+
+spawnfunc(weapon_punchy)       { spawnfunc_weapon_arc(this);                   }
+spawnfunc(weapon_nipper)       { spawnfunc_weapon_machinegun(this);    }
+spawnfunc(weapon_pumper)       { spawnfunc_weapon_shotgun(this);               }
+spawnfunc(weapon_boaster)      { spawnfunc_weapon_electro(this);               }
+spawnfunc(weapon_splasher)     { spawnfunc_weapon_vortex(this);                }
+spawnfunc(weapon_bubbleg)      { spawnfunc_weapon_hagar(this);                 }
+spawnfunc(weapon_balloony)     { spawnfunc_weapon_mortar(this);                }
+spawnfunc(weapon_betty)                { spawnfunc_weapon_devastator(this);    }
+spawnfunc(weapon_imperius)     { spawnfunc_weapon_crylink(this);               }
+
+spawnfunc(ammo_pumper)         { spawnfunc_item_shells(this);                  }
+spawnfunc(ammo_nipper)         { spawnfunc_item_bullets(this);                 }
+spawnfunc(ammo_balloony)       { spawnfunc_item_rockets(this);                 }
+spawnfunc(ammo_bubbleg)                { spawnfunc_item_rockets(this);                 }
+spawnfunc(ammo_boaster)                { spawnfunc_item_cells(this);                   }
+spawnfunc(ammo_betty)          { spawnfunc_item_rockets(this);                 }
+spawnfunc(ammo_imperius)       { spawnfunc_item_cells(this);                   }
+
+spawnfunc(item_padpower)       { spawnfunc_item_quad(this);                    }
+spawnfunc(item_climber)                { spawnfunc_item_invincible(this);              }
+spawnfunc(item_speedy)         { spawnfunc_item_haste(this);                   }
+spawnfunc(item_jump)           { spawnfunc_item_jetpack(this);                 }
+spawnfunc(item_visionless)     { spawnfunc_item_invis(this);                   }
+spawnfunc(item_revival)                { spawnfunc_item_medic(this);                   }
+spawnfunc(item_armor_padshield)        { spawnfunc_item_armor_mega(this);      }
diff --git a/qcsrc/server/compat/wop.qh b/qcsrc/server/compat/wop.qh
new file mode 100644 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
index 27fd46b88524ebc6eecd712634b4ea8af0296f37..d1c97bd2856f90d2e227f1deb65f1e314a676227 100644 (file)
@@ -2592,6 +2592,14 @@ spawnfunc(team_CTF_bluespawn)  { spawnfunc_info_player_team2(this);  }
 spawnfunc(team_CTF_neutralflag)        { spawnfunc_item_flag_neutral(this);  }
 spawnfunc(team_neutralobelisk) { spawnfunc_item_flag_neutral(this);  }
 
+// compatibility for wop maps
+spawnfunc(team_redplayer)      { spawnfunc_info_player_team1(this);  }
+spawnfunc(team_blueplayer)     { spawnfunc_info_player_team2(this);  }
+spawnfunc(team_ctl_redlolly)   { spawnfunc_item_flag_team1(this);    }
+spawnfunc(team_CTL_redlolly)   { spawnfunc_item_flag_team1(this);    }
+spawnfunc(team_ctl_bluelolly)  { spawnfunc_item_flag_team2(this);    }
+spawnfunc(team_CTL_bluelolly)  { spawnfunc_item_flag_team2(this);    }
+
 
 // ==============
 // Initialization
diff --git a/qcsrc/server/t_halflife.qc b/qcsrc/server/t_halflife.qc
deleted file mode 100644 (file)
index 7719542..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "t_halflife.qh"
-.float  roomtype;
-.float  radius;
-.float  pitch;
-.float  renderamt;
-.float  rendermode;
-.vector rendercolor;
-
-spawnfunc(weapon_crossbow) {}
-spawnfunc(weapon_handgrenade) {}
-spawnfunc(ammo_crossbow) {}
-spawnfunc(ammo_9mmclip) {}
-spawnfunc(ammo_gaussclip) {}
-spawnfunc(weapon_rpg) {}
-spawnfunc(weapon_357) {}
-void ammo_ARgrenades() {}
-spawnfunc(item_battery) {}
-spawnfunc(ammo_rpgclip) {}
-void weapon_9mmAR() {}
-spawnfunc(weapon_tripmine) {}
-spawnfunc(weapon_snark) {}
-spawnfunc(ammo_buckshot) {}
-void ammo_9mmAR() {}
-spawnfunc(ammo_357) {}
-spawnfunc(weapon_gauss) {}
-spawnfunc(weapon_hornetgun) {}
-//spawnfunc(weapon_shotgun) {}
-spawnfunc(item_healthkit) {}
-spawnfunc(item_longjump) {}
-spawnfunc(item_antidote) {}
-spawnfunc(func_recharge) {}
-spawnfunc(info_node) {}
-spawnfunc(env_sound) {}
-spawnfunc(light_spot) {}
-spawnfunc(func_healthcharger) {}
diff --git a/qcsrc/server/t_halflife.qh b/qcsrc/server/t_halflife.qh
deleted file mode 100644 (file)
index 6f70f09..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#pragma once
diff --git a/qcsrc/server/t_quake.qc b/qcsrc/server/t_quake.qc
deleted file mode 100644 (file)
index 7a277df..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "t_quake.qh"
-
-#include <common/weapons/_all.qh>
-
-spawnfunc(weapon_electro);
-spawnfunc(weapon_hagar);
-spawnfunc(weapon_machinegun);
-spawnfunc(item_bullets);
-spawnfunc(item_armor_mega);
-spawnfunc(item_health_mega);
-spawnfunc(item_health_medium);
-
-//***********************
-//QUAKE 1 ENTITIES - So people can play quake1 maps with the xonotic weapons
-//***********************
-spawnfunc(weapon_nailgun) {spawnfunc_weapon_electro(this);}
-spawnfunc(weapon_supernailgun) {spawnfunc_weapon_hagar(this);}
-spawnfunc(weapon_supershotgun) {spawnfunc_weapon_machinegun(this);}
-
-spawnfunc(item_spikes) {spawnfunc_item_bullets(this);}
-//spawnfunc(item_armor1) {spawnfunc_item_armor_medium(this);}  // FIXME: in Quake this is green armor, in Xonotic maps it is an armor shard
-spawnfunc(item_armor2) {spawnfunc_item_armor_mega(this);}
-spawnfunc(item_armorInv) {spawnfunc_item_armor_mega(this);} // TODO: make sure we actually want this
-spawnfunc(item_health) {if (this.spawnflags & 2) spawnfunc_item_health_mega(this);else spawnfunc_item_health_medium(this);}
-
-//spawnfunc_item_spikes
-//spawnfunc_item_health
-
-
-
diff --git a/qcsrc/server/t_quake.qh b/qcsrc/server/t_quake.qh
deleted file mode 100644 (file)
index 6f70f09..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#pragma once
diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc
deleted file mode 100644 (file)
index 85ec325..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-#include "t_quake3.qh"
-
-#include <common/weapons/_all.qh>
-
-spawnfunc(weapon_crylink);
-spawnfunc(weapon_electro);
-spawnfunc(weapon_hagar);
-spawnfunc(weapon_machinegun);
-spawnfunc(weapon_vortex);
-
-spawnfunc(target_items);
-
-spawnfunc(item_bullets);
-spawnfunc(item_cells);
-spawnfunc(item_rockets);
-spawnfunc(item_shells);
-
-spawnfunc(item_jetpack);
-
-spawnfunc(item_armor_big);
-spawnfunc(item_armor_mega);
-spawnfunc(item_armor_small);
-
-spawnfunc(item_health_medium);
-spawnfunc(item_health_mega);
-
-//***********************
-//QUAKE 3 ENTITIES - So people can play quake3 maps with the xonotic weapons
-//***********************
-
-// NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
-
-// SG -> SG
-spawnfunc(ammo_shells)         { spawnfunc_item_shells(this);         }
-
-// MG -> MG
-spawnfunc(ammo_bullets)        { spawnfunc_item_bullets(this);        }
-
-// GL -> Mortar
-spawnfunc(ammo_grenades)       { spawnfunc_item_rockets(this);        }
-
-// LG -> Lightning
-spawnfunc(weapon_lightning)    { spawnfunc_weapon_electro(this);      }
-spawnfunc(ammo_lightning)      { spawnfunc_item_cells(this);          }
-
-// Plasma -> Hagar
-spawnfunc(weapon_plasmagun)    { spawnfunc_weapon_hagar(this);        }
-spawnfunc(ammo_cells)          { spawnfunc_item_rockets(this);        }
-
-// Rail -> Vortex
-spawnfunc(weapon_railgun)      { spawnfunc_weapon_vortex(this);          }
-spawnfunc(ammo_slugs)          { spawnfunc_item_cells(this);          }
-
-// BFG -> Crylink
-spawnfunc(weapon_bfg)          { spawnfunc_weapon_crylink(this);      }
-spawnfunc(ammo_bfg)            { spawnfunc_item_cells(this);          }
-
-// RL -> RL
-spawnfunc(ammo_rockets)        { spawnfunc_item_rockets(this);        }
-
-// Armor
-spawnfunc(item_armor_body)     { spawnfunc_item_armor_mega(this);    }
-spawnfunc(item_armor_combat)   { spawnfunc_item_armor_big(this);      }
-spawnfunc(item_armor_shard)    { spawnfunc_item_armor_small(this);    }
-spawnfunc(item_enviro)         { spawnfunc_item_invincible(this);     }
-
-.float wait;
-.float delay;
-
-// weapon remove ent from df
-void target_init_verify(entity this)
-{
-       entity trigger, targ;
-       for(trigger = NULL; (trigger = find(trigger, classname, "trigger_multiple")); )
-               for(targ = NULL; (targ = find(targ, targetname, trigger.target)); )
-                       if (targ.classname == "target_init" || targ.classname == "target_give" || targ.classname == "target_items")
-                       {
-                               trigger.wait = 0;
-                               trigger.delay = 0;
-                               targ.wait = 0;
-                               targ.delay = 0;
-
-                               //setsize(targ, trigger.mins, trigger.maxs);
-                               //setorigin(targ, trigger.origin);
-                               //remove(trigger);
-                       }
-}
-
-spawnfunc(target_init)
-{
-       this.spawnflags = 0; // remove all weapons except the ones listed below
-       this.netname = "shotgun"; // keep these weapons through the remove trigger
-       spawnfunc_target_items(this);
-       InitializeEntity(this, target_init_verify, INITPRIO_FINDTARGET);
-}
-
-// weapon give ent from defrag
-void target_give_init(entity this)
-{
-       IL_EACH(g_items, it.targetname == this.target,
-       {
-               if (it.classname == "weapon_rocketlauncher" || it.classname == "weapon_devastator") {
-                       this.ammo_rockets += it.count * WEP_CVAR(devastator, ammo);
-                       this.netname = "devastator";
-               }
-               else if (it.classname == "weapon_plasmagun") {
-                       this.ammo_rockets += it.count * WEP_CVAR_PRI(hagar, ammo); // WEAPONTODO
-                       if(this.netname == "")
-                               this.netname = "hagar";
-                       else
-                               this.netname = strcat(this.netname, " hagar");
-               }
-               else if (it.classname == "weapon_bfg") {
-                       this.ammo_cells += it.count * WEP_CVAR_PRI(crylink, ammo);
-                       if(this.netname == "")
-                               this.netname = "crylink";
-                       else
-                               this.netname = strcat(this.netname, " crylink");
-               }
-               else if (it.classname == "weapon_grenadelauncher" || it.classname == "weapon_mortar") {
-                       this.ammo_rockets += it.count * WEP_CVAR_PRI(mortar, ammo); // WEAPONTODO
-                       if(this.netname == "")
-                               this.netname = "mortar";
-                       else
-                               this.netname = strcat(this.netname, " mortar");
-               }
-               else if (it.classname == "item_armor_body")
-                       this.armorvalue = 100;
-               else if (it.classname == "item_health_mega")
-                       this.health = 200;
-               //remove(it); // removing ents in init functions causes havoc, workaround:
-        setthink(it, SUB_Remove);
-        it.nextthink = time;
-       });
-       this.spawnflags = 2;
-       spawnfunc_target_items(this);
-       InitializeEntity(this, target_init_verify, INITPRIO_FINDTARGET);
-}
-
-spawnfunc(target_give)
-{
-       InitializeEntity(this, target_give_init, INITPRIO_FINDTARGET);
-}
-
-//spawnfunc(item_flight)       /* handled by jetpack */
-//spawnfunc(item_haste)        /* handled by buffs mutator */
-//spawnfunc(item_health)       /* handled in t_quake.qc */
-//spawnfunc(item_health_large) /* handled in t_items.qc */
-//spawnfunc(item_health_small) /* handled in t_items.qc */
-//spawnfunc(item_health_mega)  /* handled in t_items.qc */
-//spawnfunc(item_invis)        /* handled by buffs mutator */
-//spawnfunc(item_regen)        /* handled by buffs mutator */
-
-// CTF spawnfuncs handled in mutators/gamemode_ctf.qc now
-
-spawnfunc(item_flight)
-{
-       spawnfunc_item_jetpack(this);
-}
-
-.float notteam;
-.float notsingle;
-.float notfree;
-.float notq3a;
-.float notta;
-.string gametype;
-bool DoesQ3ARemoveThisEntity(entity this)
-{
-       // Q3 style filters (DO NOT USE, THIS IS COMPAT ONLY)
-
-       if(this.notq3a)
-               if(!teamplay || g_tdm || g_ctf)
-                       return true;
-
-       if(this.notta)
-               if (!(!teamplay || g_tdm || g_ctf))
-                       return true;
-
-       if(this.notsingle)
-               if(maxclients == 1)
-                       return true;
-
-       if(this.notteam)
-               if(teamplay)
-                       return true;
-
-       if(this.notfree)
-               if(!teamplay)
-                       return true;
-
-       if(this.gametype)
-       {
-               string gametypename;
-               // static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"}
-               gametypename = "ffa";
-               if(teamplay)
-                       gametypename = "team";
-               if(g_ctf)
-                       gametypename = "ctf";
-               if(maxclients == 1)
-                       gametypename = "single";
-               // we do not have the other types (oneflag, obelisk, harvester, teamtournament)
-               if(strstrofs(this.gametype, gametypename, 0) < 0)
-                       return true;
-       }
-
-       return false;
-}
diff --git a/qcsrc/server/t_quake3.qh b/qcsrc/server/t_quake3.qh
deleted file mode 100644 (file)
index 6f70f09..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#pragma once
index 93d2af55b49c94ec83fe07c400cf3ac75254a931..2e0ee09bf8df718d593943e4a777f0b99d1627b5 100644 (file)
@@ -455,7 +455,6 @@ void W_WeaponFrame(Player actor, .entity weaponentity)
                this.m_switchingweapon = WEP_Null;
                this.state = WS_CLEAR;
                this.weaponname = "";
-               // actor.items &= ~IT_AMMO;
                return;
        }