remove pause at end of match

This commit is contained in:
Beu 2024-06-16 17:04:15 +02:00
parent e2b4b29d41
commit 0420d6b08e

View File

@ -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)) {