From: TimePath Date: Mon, 24 Aug 2015 01:48:12 +0000 (+1000) Subject: Hook reset_map_global to call Item_ItemsTime_ResetTimes() X-Git-Tag: xonotic-v0.8.2~2042^2~6 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6557e922b9f5f932ce3d4b81002b19fc2763121c;p=xonotic%2Fxonotic-data.pk3dir.git Hook reset_map_global to call Item_ItemsTime_ResetTimes() --- 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;