From 6557e922b9f5f932ce3d4b81002b19fc2763121c Mon Sep 17 00:00:00 2001 From: TimePath Date: Mon, 24 Aug 2015 11:48:12 +1000 Subject: [PATCH] Hook reset_map_global to call Item_ItemsTime_ResetTimes() --- qcsrc/common/mutators/mutator/itemstime.qc | 4 ++++ qcsrc/server/command/vote.qc | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/mutators/mutator/itemstime.qc b/qcsrc/common/mutators/mutator/itemstime.qc index 329db6d16..85e5caaf5 100644 --- a/qcsrc/common/mutators/mutator/itemstime.qc +++ b/qcsrc/common/mutators/mutator/itemstime.qc @@ -194,4 +194,8 @@ float Item_ItemsTime_UpdateTime(entity e, float t) return t; } +MUTATOR_HOOKFUNCTION(itemstime, reset_map_global) { + Item_ItemsTime_ResetTimes(); +} + #endif diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index f9b8fae07..4be48e124 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -432,8 +432,6 @@ void ReadyRestart_think() return; } -void Item_ItemsTime_ResetTimes(); - // Forces a restart of the game without actually reloading the map // this is a mess... void ReadyRestart_force() { @@ -464,8 +462,6 @@ void ReadyRestart_force() // disable the warmup global for the server warmup_stage = 0; // once the game is restarted the game is in match stage - Item_ItemsTime_ResetTimes(); - // reset the .ready status of all players (also spectators) FOR_EACH_REALCLIENT(tmp_player) { tmp_player.ready = 0; } readycount = 0; -- 2.39.2