From d136587ffb975f3e23e34625b5c9c36d1a8354c8 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 5 Mar 2017 03:05:20 +1000 Subject: [PATCH] Try to make the maths more reliable in item respawning --- qcsrc/common/t_items.qh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/t_items.qh b/qcsrc/common/t_items.qh index 1b2293bcf..198bd0f41 100644 --- a/qcsrc/common/t_items.qh +++ b/qcsrc/common/t_items.qh @@ -63,9 +63,9 @@ bool have_pickup_item(entity this); const float ITEM_RESPAWN_TICKS = 10; -#define ITEM_RESPAWNTIME(i) ((i).respawntime + crandom() * (i).respawntimejitter) +#define ITEM_RESPAWNTIME(i) ((i).respawntime + (crandom() * (i).respawntimejitter)) // range: respawntime - respawntimejitter .. respawntime + respawntimejitter -#define ITEM_RESPAWNTIME_INITIAL(i) (ITEM_RESPAWN_TICKS + random() * ((i).respawntime + (i).respawntimejitter - ITEM_RESPAWN_TICKS)) +#define ITEM_RESPAWNTIME_INITIAL(i) (ITEM_RESPAWN_TICKS + (random() * ((i).respawntime + (i).respawntimejitter - ITEM_RESPAWN_TICKS))) // range: 10 .. respawntime + respawntimejitter .float max_armorvalue; -- 2.39.2