]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't use a countdown if the powerup is set to respawn quickly
authorMario <mario@smbclan.net>
Wed, 9 Mar 2016 06:01:53 +0000 (16:01 +1000)
committerMario <mario@smbclan.net>
Wed, 9 Mar 2016 06:01:53 +0000 (16:01 +1000)
qcsrc/common/t_items.qc

index 876bc6347a5e9cc8c1d4a11decca8b61f6ae4ea3..c4eea40ee6647c108cbf718c6575fc29425c32c8 100644 (file)
@@ -582,7 +582,8 @@ void Item_RespawnThink()
 
 void Item_ScheduleRespawnIn(entity e, float t)
 {
-       if (Item_ItemsTime_Allow(e.itemdef) || e.weapons & WEPSET_SUPERWEAPONS)
+       // if the respawn time is longer than 10 seconds, show a waypoint, otherwise, just respawn normally
+       if ((Item_ItemsTime_Allow(e.itemdef) || e.weapons & WEPSET_SUPERWEAPONS) && (t - ITEM_RESPAWN_TICKS) > 0)
        {
                e.think = Item_RespawnCountdown;
                e.nextthink = time + max(0, t - ITEM_RESPAWN_TICKS);