From: bones_was_here Date: Mon, 13 Mar 2023 15:26:21 +0000 (+1000) Subject: Only set up q3compat item teaming for enabled and mapper-placed items X-Git-Tag: xonotic-v0.8.6~148 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ae6a43277b40d631e67269069db193165a299e9e;p=xonotic%2Fxonotic-data.pk3dir.git Only set up q3compat item teaming for enabled and mapper-placed items --- diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index ea69ece56..6562e5753 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -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)