From: Mario Date: Sat, 4 Mar 2017 17:05:20 +0000 (+1000) Subject: Try to make the maths more reliable in item respawning X-Git-Tag: xonotic-v0.8.2~140 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d136587ffb975f3e23e34625b5c9c36d1a8354c8;p=xonotic%2Fxonotic-data.pk3dir.git Try to make the maths more reliable in item respawning --- 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;