Don't skip replay map if replayer left.

This commit is contained in:
Max Klaversma 2014-05-04 13:02:53 +02:00
parent fa5752d9ce
commit 183137732c

View File

@ -201,7 +201,7 @@ class MapQueue implements CallbackListener, CommandListener {
unset($this->queuedMaps[$map->uid]); 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) { foreach ($this->queuedMaps as $queuedMap) {
$player = $queuedMap[0]; $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 //found player, so play this map
if ($this->maniaControl->playerManager->getPlayer($player->login)) { if ($this->maniaControl->playerManager->getPlayer($player->login)) {
break; break;