From 32aeaf4774358532d6b89e288b972f1556e37a96 Mon Sep 17 00:00:00 2001 From: z411 Date: Wed, 28 Apr 2021 15:36:25 -0400 Subject: [PATCH] Fixed items respawn time --- .../common/mutators/mutator/itemstime/itemstime.qc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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() -- 2.39.2