From 05eb948bf37619613a2fc73c02924c96c908cf10 Mon Sep 17 00:00:00 2001 From: beu Date: Sat, 5 Mar 2022 18:03:26 +0100 Subject: [PATCH] fix rounds message in cup mode --- MatchManagerSuite/MatchManagerCore.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/MatchManagerSuite/MatchManagerCore.php b/MatchManagerSuite/MatchManagerCore.php index 7540c4b..e574548 100644 --- a/MatchManagerSuite/MatchManagerCore.php +++ b/MatchManagerSuite/MatchManagerCore.php @@ -38,7 +38,7 @@ use ManiaControl\Maps\Map; class MatchManagerCore implements CallbackListener, CommandListener, TimerListener, CommunicationListener, Plugin { const PLUGIN_ID = 152; - const PLUGIN_VERSION = 3.2; + const PLUGIN_VERSION = 3.3; const PLUGIN_NAME = 'MatchManager Core'; const PLUGIN_AUTHOR = 'Beu'; @@ -1555,8 +1555,15 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen // $this->preendroundscore = array(); if (!$this->pauseon && !$this->skipround) { - if ($this->currentgmbase != "Cup" || ($this->currentgmbase == "Cup" && count($this->currentscore) > 0 && $this->currentscore[0][4] > 0)) { // Round is skipped if no one finishes only in cup mode + if ($this->currentgmbase != "Cup") { $this->nbrounds++; + } else if ($this->currentgmbase == "Cup" && count($this->currentscore) > 0) { // Round is skipped if no one finishes only in cup mode + foreach ($this->currentscore as $score) { + if ($score[4] > 0) { + $this->nbrounds++; + break; + } + } } else { Logger::log("Round not counted because no one finished"); }