From: bones_was_here Date: Fri, 16 Jun 2023 12:38:50 +0000 (+1000) Subject: Fix resetmatch not deleting loot items X-Git-Tag: xonotic-v0.8.6~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a65e47aec60ff88e2f575e88dd6516cf4648eb08;p=xonotic%2Fxonotic-data.pk3dir.git Fix resetmatch not deleting loot items Accidentally changed the .reset function for loot in !1202 --- diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index 46587b9c1..d0353866f 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -1046,6 +1046,8 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default } else { + this.reset = Item_Reset; + // must be done after def.m_iteminit() as that may set ITEM_FLAG_MUTATORBLOCKED if(!have_pickup_item(this)) { @@ -1174,10 +1176,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default this.reset = Item_FindTeam; } else - { - this.reset = Item_Reset; Item_Reset(this); - } Net_LinkEntity(this, !(def.instanceOfPowerup || def.instanceOfHealth || def.instanceOfArmor), 0, ItemSend);