From: bones_was_here Date: Wed, 14 Jun 2023 11:41:02 +0000 (+1000) Subject: items: remove override of Item_Think() in Item_InitializeLoot() X-Git-Tag: xonotic-v0.8.6~7^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f6055aabf1cf36b72605a57c4aa7a2a97c24810c;p=xonotic%2Fxonotic-data.pk3dir.git items: remove override of Item_Think() in Item_InitializeLoot() This was preventing any updates being sent to CSQC for items spawned via this code path (except the final deletion when the item expired). --- diff --git a/qcsrc/server/items/spawning.qc b/qcsrc/server/items/spawning.qc index 561a5673a..2f0668344 100644 --- a/qcsrc/server/items/spawning.qc +++ b/qcsrc/server/items/spawning.qc @@ -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; }