From ae6a43277b40d631e67269069db193165a299e9e Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Tue, 14 Mar 2023 01:26:21 +1000 Subject: [PATCH] Only set up q3compat item teaming for enabled and mapper-placed items --- qcsrc/server/items/items.qc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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) -- 2.39.2