Example #1
0
 private function prepareMatch($server, $match)
 {
     $id = $this->matchMakingService->registerMatch($server, $match, $this->scriptName, $this->titleIdString, $this->storage->serverLogin);
     \ManiaLive\Utilities\Logger::debug(sprintf('Preparing match %d on server: %s', $id, $server));
     \ManiaLive\Utilities\Logger::debug($match);
     $this->countDown[$id] = 7;
     foreach ($match->players as $player) {
         $this->gui->removeLabel($player);
         $this->gui->removeWaitingScreen($player);
         $this->gui->showMatchSumUp($match, $player, 5);
         $this->resetShortKey($player);
         Services\PlayerInfo::Get($player)->isInMatch = true;
         $this->connection->forceSpectator((string) $player, 1, true);
     }
     $this->connection->executeMulticall();
     $this->updatePlayerList = true;
 }