From 03b51e675b1135983a76c4598e78075ff6ea29d4 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Tue, 28 Dec 2021 11:08:33 +0100 Subject: [PATCH] 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. --- Content.Server/GameTicking/GameTicker.RoundFlow.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index f5c3accf36..25419a3781 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -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) 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) RaiseLocalEvent(new RulePlayerJobsAssignedEvent(assignedJobs.Keys.ToArray(), profiles, force)); - _pauseManager.DoMapInitialize(DefaultMap); - _roundStartDateTime = DateTime.UtcNow; RunLevel = GameRunLevel.InRound;