[MapRotation] Fix SVRandomMapRotation
This commit is contained in:
parent
4f89102165
commit
d7e9ff19ee
@ -109,13 +109,6 @@ namespace Components
|
|||||||
|
|
||||||
Logger::DebugInfo("DedicatedRotation size after parsing is '{}'\n", DedicatedRotation.getEntriesSize());
|
Logger::DebugInfo("DedicatedRotation size after parsing is '{}'\n", DedicatedRotation.getEntriesSize());
|
||||||
|
|
||||||
// Shuffles values
|
|
||||||
if (SVRandomMapRotation.get<bool>())
|
|
||||||
{
|
|
||||||
Logger::Print(Game::CON_CHANNEL_SERVER, "Randomizing the map rotation\n");
|
|
||||||
DedicatedRotation.randomize();
|
|
||||||
}
|
|
||||||
|
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,6 +203,19 @@ namespace Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MapRotation::RandomizeMapRotation()
|
||||||
|
{
|
||||||
|
if (SVRandomMapRotation.get<bool>())
|
||||||
|
{
|
||||||
|
Logger::Print(Game::CON_CHANNEL_SERVER, "Randomizing the map rotation\n");
|
||||||
|
DedicatedRotation.randomize();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Logger::DebugInfo("Map rotation was not randomized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MapRotation::SV_MapRotate_f()
|
void MapRotation::SV_MapRotate_f()
|
||||||
{
|
{
|
||||||
if (!ShouldRotate())
|
if (!ShouldRotate())
|
||||||
@ -234,6 +240,8 @@ namespace Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RandomizeMapRotation();
|
||||||
|
|
||||||
ApplyMapRotation();
|
ApplyMapRotation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ namespace Components
|
|||||||
static bool ShouldRotate();
|
static bool ShouldRotate();
|
||||||
static void RestartCurrentMap();
|
static void RestartCurrentMap();
|
||||||
static void ApplyMapRotation();
|
static void ApplyMapRotation();
|
||||||
|
static void RandomizeMapRotation();
|
||||||
|
|
||||||
static void SV_MapRotate_f();
|
static void SV_MapRotate_f();
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user