]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Only set up q3compat item teaming for enabled and mapper-placed items
authorbones_was_here <bones_was_here@xonotic.au>
Mon, 13 Mar 2023 15:26:21 +0000 (01:26 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Mon, 13 Mar 2023 17:54:07 +0000 (03:54 +1000)
qcsrc/server/items/items.qc

index ea69ece56bdd185295a4cf8fd4cb1ccdfbd72573..6562e57533ee57e928c27af5907aa128a6060137 100644 (file)
@@ -985,13 +985,6 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
        precache_model(this.model);
        precache_sound(this.item_pickupsound);
 
-       if(q3compat && !this.team)
-       {
-               string t = GetField_fullspawndata(this, "team", false);
-               // bones_was_here: this hack is cheaper than changing to a .string strcmp()
-               if(t) this.team = crc16(false, t);
-       }
-
        if (Item_IsLoot(this))
        {
                this.reset = RemoveItem;
@@ -1034,6 +1027,13 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
                if(this.angles != '0 0 0')
                        this.SendFlags |= ISF_ANGLES;
 
+               if(q3compat && !this.team)
+               {
+                       string t = GetField_fullspawndata(this, "team");
+                       // bones_was_here: this hack is cheaper than changing to a .string strcmp()
+                       if(t) this.team = crc16(false, t);
+               }
+
                this.reset = this.team ? Item_FindTeam : Item_Reset;
                // it's a level item
                if(this.spawnflags & 1)