From 47809cd1c5e498392b6959121f9b330a9fc316c7 Mon Sep 17 00:00:00 2001 From: kremsy Date: Wed, 26 Feb 2014 15:19:44 +0100 Subject: [PATCH] maplist fix --- application/core/Maps/MapManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 6021a594..552352ee 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -251,7 +251,7 @@ class MapManager implements CallbackListener { $currentIndex = $this->getMapIndex($this->currentMap); //No RestructureNeeded - if ($currentIndex < 14) { + if ($currentIndex < Maplist::MAX_MAPS_PER_PAGE - 1) { return true; } @@ -260,7 +260,6 @@ class MapManager implements CallbackListener { $i = 0; foreach($this->maps as $map) { - /** @var Map $map */ if ($i < $currentIndex) { $lowerMapArray[] = $map->fileName; } else { @@ -270,6 +269,7 @@ class MapManager implements CallbackListener { } $mapArray = array_merge($higherMapArray, $lowerMapArray); + array_shift($mapArray); try { $this->maniaControl->client->chooseNextMapList($mapArray);