From 4f18b51cbad437885f62d3a093d8aef27c9dd343 Mon Sep 17 00:00:00 2001 From: beu Date: Thu, 6 Jun 2024 11:18:59 +0200 Subject: [PATCH] change matchStarted variable sooner when match end --- MatchManagerSuite/MatchManagerCore.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MatchManagerSuite/MatchManagerCore.php b/MatchManagerSuite/MatchManagerCore.php index 66093da..8d044d0 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.1; + const PLUGIN_VERSION = 5.2; const PLUGIN_NAME = 'MatchManager Core'; const PLUGIN_AUTHOR = 'Beu'; @@ -1059,6 +1059,9 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen */ public function MatchEnd() { try { + // Since now, we conside the match not started + $this->matchStarted = false; + // 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)) { @@ -1114,6 +1117,9 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen } try { + // Since now, we conside the match not started + $this->matchStarted = false; + // Trigger Callback $this->maniaControl->getCallbackManager()->triggerCallback(self::CB_MATCHMANAGER_STOPMATCH, $this->matchid, $this->currentscore, $this->currentteamsscore);