From 0420d6b08ec8c2f8cd3dc1769e93b485cf8a0cbc Mon Sep 17 00:00:00 2001 From: beu Date: Sun, 16 Jun 2024 17:04:15 +0200 Subject: [PATCH] remove pause at end of match --- MatchManagerSuite/MatchManagerCore.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MatchManagerSuite/MatchManagerCore.php b/MatchManagerSuite/MatchManagerCore.php index 8d044d0..dce3400 100644 --- a/MatchManagerSuite/MatchManagerCore.php +++ b/MatchManagerSuite/MatchManagerCore.php @@ -38,7 +38,7 @@ use ManiaControl\Callbacks\TimerListener; // for pause class MatchManagerCore implements CallbackListener, CommandListener, TimerListener, CommunicationListener, Plugin { const PLUGIN_ID = 152; - const PLUGIN_VERSION = 5.2; + const PLUGIN_VERSION = 5.3; const PLUGIN_NAME = 'MatchManager Core'; const PLUGIN_AUTHOR = 'Beu'; @@ -745,6 +745,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen public function resetMatchVariables() { $this->matchStarted = false; $this->matchrecover = false; + $this->pauseon = false; $this->pointstorecover = array(); $this->currentscore = array(); $this->preendroundscore = array(); @@ -1125,6 +1126,11 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen $this->maniaControl->getChat()->sendError($this->chatprefix . 'Match stopped by an Admin!'); + // Cancel pause if match stopped during a pause + if ($this->pauseon) { + $this->unsetNadeoPause(); + } + // Load TimeAttack gamemode if possible $maplist = 'MatchSettings' . DIRECTORY_SEPARATOR . $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_POST_MATCH_MAPLIST); if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {