예제 #1
0
 function onBeginMap($map, $warmUp, $matchContinuation)
 {
     $this->checkpoints = array();
     $oldMap = $this->currentMap;
     $this->currentMap = Map::fromArray($map);
     if ($oldMap) {
         Console::printlnFormatted('Map change: ' . Formatting::stripStyles($oldMap->name) . ' -> ' . Formatting::stripStyles($this->currentMap->name));
     }
     $this->resetScores();
     if ($warmUp) {
         $this->isWarmUp = true;
     }
     $gameInfos = $this->connection->getCurrentGameInfo();
     if ($gameInfos != $this->gameInfos) {
         foreach ($gameInfos as $key => $value) {
             $this->gameInfos->{$key} = $value;
         }
     }
     $serverOptions = $this->connection->getServerOptions();
     if ($serverOptions != $this->server) {
         foreach ($serverOptions as $key => $value) {
             $this->server->{$key} = $value;
         }
     }
 }
예제 #2
0
 function onBeginMap($map, $warmUp, $matchContinuation)
 {
     $map = \DedicatedApi\Structures\Map::fromArray($map);
     $this->postTwitterMessage(sprintf("Map change for %s", $this->formatForTwitter($map->name)));
 }