MapInitialize before spawning players in.

Fixes #5924. This is not ideal, but the way PDA/GameTicker interact to set the owner on the ID Card is ATROCIOUS and I can't be bothered to fix that.
This commit is contained in:
Vera Aguilera Puerto
2021-12-28 11:08:33 +01:00
parent f83b64bdec
commit 03b51e675b

View File

@@ -201,6 +201,9 @@ namespace Content.Server.GameTicking
} }
} }
// MapInitialize *before* spawning players, our codebase is too shit to do it afterwards...
_pauseManager.DoMapInitialize(DefaultMap);
// Allow game rules to spawn players by themselves if needed. (For example, nuke ops or wizard) // Allow game rules to spawn players by themselves if needed. (For example, nuke ops or wizard)
RaiseLocalEvent(new RulePlayerSpawningEvent(readyPlayers, profiles, force)); RaiseLocalEvent(new RulePlayerSpawningEvent(readyPlayers, profiles, force));
@@ -254,8 +257,6 @@ namespace Content.Server.GameTicking
// Allow rules to add roles to players who have been spawned in. (For example, on-station traitors) // Allow rules to add roles to players who have been spawned in. (For example, on-station traitors)
RaiseLocalEvent(new RulePlayerJobsAssignedEvent(assignedJobs.Keys.ToArray(), profiles, force)); RaiseLocalEvent(new RulePlayerJobsAssignedEvent(assignedJobs.Keys.ToArray(), profiles, force));
_pauseManager.DoMapInitialize(DefaultMap);
_roundStartDateTime = DateTime.UtcNow; _roundStartDateTime = DateTime.UtcNow;
RunLevel = GameRunLevel.InRound; RunLevel = GameRunLevel.InRound;