From 183137732c587f75681851209939b784cc4c7d5c Mon Sep 17 00:00:00 2001 From: Max Klaversma Date: Sun, 4 May 2014 13:02:53 +0200 Subject: [PATCH] Don't skip replay map if replayer left. --- application/core/Maps/MapQueue.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/core/Maps/MapQueue.php b/application/core/Maps/MapQueue.php index eceec27b..6d6c47b1 100644 --- a/application/core/Maps/MapQueue.php +++ b/application/core/Maps/MapQueue.php @@ -201,7 +201,7 @@ class MapQueue implements CallbackListener, CommandListener { unset($this->queuedMaps[$map->uid]); } - array_unshift($this->queuedMaps, array($player, $map)); + array_unshift($this->queuedMaps, array($player, $map, true)); } } @@ -301,6 +301,11 @@ class MapQueue implements CallbackListener, CommandListener { foreach ($this->queuedMaps as $queuedMap) { $player = $queuedMap[0]; + // Check if map is added via replay vote/command + if(isset($queuedMap[2]) && $queuedMap[2] === true) { + break; + } + //found player, so play this map if ($this->maniaControl->playerManager->getPlayer($player->login)) { break;