[MapRotation] Allow people to have empty sv_mapRotation
This commit is contained in:
parent
b8bca79c67
commit
4f89102165
@ -220,18 +220,16 @@ namespace Components
|
|||||||
Logger::Print(Game::CON_CHANNEL_SERVER, "Rotating map...\n");
|
Logger::Print(Game::CON_CHANNEL_SERVER, "Rotating map...\n");
|
||||||
const std::string mapRotation = (*SVMapRotation)->current.string;
|
const std::string mapRotation = (*SVMapRotation)->current.string;
|
||||||
|
|
||||||
if (mapRotation.empty())
|
// People may have sv_mapRotation empty because they only use 'addMap' or 'addMap'
|
||||||
|
if (!mapRotation.empty())
|
||||||
{
|
{
|
||||||
Logger::Print(Game::CON_CHANNEL_SERVER, "No rotation defined (sv_mapRotation is empty), restarting map.\n");
|
Logger::DebugInfo("sv_mapRotation is not empty. Parsing...");
|
||||||
RestartCurrentMap();
|
LoadRotation(mapRotation);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadRotation(mapRotation);
|
|
||||||
|
|
||||||
if (DedicatedRotation.getEntriesSize() == 0)
|
if (DedicatedRotation.getEntriesSize() == 0)
|
||||||
{
|
{
|
||||||
Logger::Print(Game::CON_CHANNEL_SERVER, "sv_mapRotation is empty or contains invalid data, restarting map.\n");
|
Logger::Print(Game::CON_CHANNEL_SERVER, "sv_mapRotation is empty or contains invalid data. Restarting map\n");
|
||||||
RestartCurrentMap();
|
RestartCurrentMap();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user