From 7c7f49497361e54812f8e5a620f80615bd63511c Mon Sep 17 00:00:00 2001 From: Beu Date: Thu, 27 May 2021 23:58:41 +0200 Subject: [PATCH] update version + minor fix --- MatchManagerSuite/MatchManagerCore.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MatchManagerSuite/MatchManagerCore.php b/MatchManagerSuite/MatchManagerCore.php index 71df4a2..5bd3c6d 100644 --- a/MatchManagerSuite/MatchManagerCore.php +++ b/MatchManagerSuite/MatchManagerCore.php @@ -39,7 +39,7 @@ use Maniaplanet\DedicatedServer\InvalidArgumentException; class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener, CommandListener, TimerListener, CommunicationListener, Plugin { const PLUGIN_ID = 152; - const PLUGIN_VERSION = 1.3; + const PLUGIN_VERSION = 1.4; const PLUGIN_NAME = 'MatchManager Core'; const PLUGIN_AUTHOR = 'Beu'; @@ -1487,7 +1487,9 @@ class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener, $results = $structure->getPlayerScores(); // Resort scores - usort($results, function ($a, $b) { return -($a->getMatchPoints() + $a->getRoundPoints() <=> $b->getMatchPoints() + $b->getRoundPoints()); }); + if ($structure->getSection() == "PreEndRound") { + usort($results, function ($a, $b) { return -($a->getMatchPoints() + $a->getRoundPoints() <=> $b->getMatchPoints() + $b->getRoundPoints()); }); + } // CUP Specific variables $this->nbwinners = 0; @@ -1865,3 +1867,4 @@ class MatchManagerCore implements ManialinkPageAnswerListener, CallbackListener, } } } +