]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Non-respawning items: Allow 'respawntime -1' to cause an item to never respawn again...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 8 Sep 2010 09:52:58 +0000 (12:52 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 8 Sep 2010 09:52:58 +0000 (12:52 +0300)
qcsrc/server/t_items.qc

index c291e79a009f715fb67e0decc66d0cde175fb809..449cebe8aa2d33a29ff91799710e74bf539516cc 100644 (file)
@@ -234,7 +234,8 @@ void Item_ScheduleRespawnIn(entity e, float t)
 void Item_ScheduleRespawn(entity e)
 {
        Item_Show(e, 0);
-       Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));
+       if(e.respawntime > 0) // if respawntime is -1, this item does not respawn
+               Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));
 }
 
 void Item_ScheduleInitialRespawn(entity e)