From: Rudolf Polzer Date: Wed, 8 Sep 2010 10:33:38 +0000 (+0200) Subject: change respawn logic to only use the -1 "hidden totally, currently inactive" mode... X-Git-Tag: xonotic-v0.1.0preview~315^2~4^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=61e0672eac2b935b9a91738a0a5aeae91e867f8e;p=xonotic%2Fxonotic-data.pk3dir.git change respawn logic to only use the -1 "hidden totally, currently inactive" mode for picked up items with respawntime -1. This makes sure the item will come back e.g. on assault round end, but still is gone entirely. --- diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index f00369eb6..c2b2deb87 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -233,11 +233,13 @@ void Item_ScheduleRespawnIn(entity e, float t) void Item_ScheduleRespawn(entity e) { - Item_Show(e, 0); - if(e.respawntime > 0) // if respawntime is -1, this item does not respawn + if(e.respawntime > 0) + { + Item_Show(e, 0); Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e)); - else - remove(e); + } + else // if respawntime is -1, this item does not respawn + Item_Show(e, -1); } void Item_ScheduleInitialRespawn(entity e)