]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix resetmatch not deleting loot items
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 16 Jun 2023 12:38:50 +0000 (22:38 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 16 Jun 2023 12:38:50 +0000 (22:38 +1000)
Accidentally changed the .reset function for loot in !1202

qcsrc/server/items/items.qc

index 46587b9c1d9e2a974a6fd654e46437d7c7c50d72..d0353866ff9007e0fe5ac16c30fe0f9e60cbde8c 100644 (file)
@@ -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);