fix specqueue

This commit is contained in:
kremsy 2014-02-01 14:58:56 +01:00 committed by Steffen Schröder
parent 2ffa4b47c4
commit c7e46ff304

View File

@ -282,7 +282,7 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
* @param Player $player
*/
private function forcePlayerToPlay(Player $player) {
if ($this->maniaControl->client->getMaxPlayers()['CurrentValue'] > count($this->maniaControl->playerManager->players)) {
if ($this->maniaControl->client->getMaxPlayers()['CurrentValue'] > (count($this->maniaControl->playerManager->players) - count($this->spectators))) {
$this->maniaControl->client->forceSpectator($player->login, 2);
$this->maniaControl->client->forceSpectator($player->login, 0);
if (isset($this->spectators[$player->login])) {