]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
items: remove override of Item_Think() in Item_InitializeLoot()
authorbones_was_here <bones_was_here@xonotic.au>
Wed, 14 Jun 2023 11:41:02 +0000 (21:41 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 15 Jun 2023 20:36:27 +0000 (06:36 +1000)
This was preventing any updates being sent to CSQC for items spawned via
this code path (except the final deletion when the item expired).

qcsrc/server/items/spawning.qc

index 561a5673a08011856e26d68cd28ecf8d9786add7..2f066834417387fb16769a8641cd677b0f4c4a19 100644 (file)
@@ -115,7 +115,9 @@ bool Item_InitializeLoot(entity item, string class_name, vector position,
        }
        item.gravity = 1;
        item.velocity = vel;
-       SUB_SetFade(item, time + time_to_live, 1);
+       // StartItem sets the default .wait expiry time which is respected by Item_Think()
+       if (time_to_live)
+               item.wait = time + time_to_live;
        return true;
 }