Skip to content

Commit

Permalink
Update Storage.php
Browse files Browse the repository at this point in the history
On a relay server the map list isn't returned. This fixes the issue with the current map being null while that information can be received
  • Loading branch information
oliverde8 committed Mar 30, 2014
1 parent 7efaf75 commit 4606217
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ManiaLive/Data/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ function onInit()
try
{
$this->maps = $this->connection->getMapList(-1, 0);
$this->nextMap = $this->maps[$this->connection->getNextMapIndex()];
$this->currentMap = $this->connection->getCurrentMapInfo();
Console::printlnFormatted('Current map: '.Formatting::stripStyles($this->currentMap->name));
if(isset($this->maps[$this->connection->getNextMapIndex()]))
$this->nextMap = $this->maps[$this->connection->getNextMapIndex()];
else
$this->nextMap = null;
}
catch(\Exception $e)
{
Expand Down

0 comments on commit 4606217

Please sign in to comment.