]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hook reset_map_global to call Item_ItemsTime_ResetTimes()
authorTimePath <andrew.hardaker1995@gmail.com>
Mon, 24 Aug 2015 01:48:12 +0000 (11:48 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Mon, 24 Aug 2015 01:48:12 +0000 (11:48 +1000)
qcsrc/common/mutators/mutator/itemstime.qc
qcsrc/server/command/vote.qc

index 329db6d16a24b6f6a8f292555ab732d6438c0c8b..85e5caaf56d747277889efc341170b11f7fd4bf7 100644 (file)
@@ -194,4 +194,8 @@ float Item_ItemsTime_UpdateTime(entity e, float t)
     return t;
 }
 
+MUTATOR_HOOKFUNCTION(itemstime, reset_map_global) {
+    Item_ItemsTime_ResetTimes();
+}
+
 #endif
index f9b8fae070d8161ad1cf0c761baead2e9f4fc160..4be48e124e82b98d38fb26c41c5df7dfe18efc29 100644 (file)
@@ -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;