From: z411 Date: Wed, 28 Apr 2021 19:36:25 +0000 (-0400) Subject: Fixed items respawn time X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=32aeaf4774358532d6b89e288b972f1556e37a96;p=xonotic%2Fxonotic-data.pk3dir.git Fixed items respawn time --- diff --git a/qcsrc/common/mutators/mutator/itemstime/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime/itemstime.qc index 19045727b..d30f16943 100644 --- a/qcsrc/common/mutators/mutator/itemstime/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime/itemstime.qc @@ -277,7 +277,18 @@ float Item_ItemsTime_GetTime(int item) return -1; // don't show others } else - return ItemsTime_time[item]; + { + float game_starttime = STAT(GAMESTARTTIME); + float timeout_last = STAT(TIMEOUT_LAST); + + if(ItemsTime_time[item] > 0 && game_starttime < time) + if(timeout_last) + return ItemsTime_time[item] + game_starttime - timeout_last + time; + else + return ItemsTime_time[item] + game_starttime; + else + return ItemsTime_time[item]; + } } void HUD_ItemsTime()