Revert "Load Maps on Round Start, not Round Restart (#6930)" (#6945)

This reverts commit 650b8b6600.
This commit is contained in:
Moony
2022-02-28 20:49:50 -06:00
committed by GitHub
parent 7daf7ccf8c
commit 76e6cacce6
2 changed files with 15 additions and 10 deletions

View File

@@ -190,8 +190,6 @@ namespace Content.Server.GameTicking
SendServerMessage(Loc.GetString("game-ticker-start-round"));
LoadMaps();
StartGamePresetRules();
RoundLengthMetric.Set(0);
@@ -375,6 +373,7 @@ namespace Content.Server.GameTicking
RunLevel = GameRunLevel.PreRoundLobby;
LobbySong = _robustRandom.Pick(_lobbyMusicCollection.PickFiles).ToString();
ResettingCleanup();
LoadMaps();
if (!LobbyEnabled)
{
@@ -412,18 +411,18 @@ namespace Content.Server.GameTicking
unCastData.ContentData()?.WipeMind();
}
_startingRound = false;
_mapManager.Restart();
// Delete all remaining entities.
foreach (var entity in EntityManager.GetEntities().ToArray())
// Delete all entities.
foreach (var entity in EntityManager.GetEntities().ToList())
{
// TODO: Maybe something less naive here?
// FIXME: Actually, definitely.
EntityManager.DeleteEntity(entity);
}
_startingRound = false;
_mapManager.Restart();
_roleBanManager.Restart();
// Clear up any game rules.