Allow mind system to spawn ghosts during the post-round phase. (#19091)
This commit is contained in:
@@ -143,7 +143,7 @@ public sealed class MindSystem : EntitySystem
|
||||
private void OnMindContainerTerminating(EntityUid uid, MindContainerComponent component, ref EntityTerminatingEvent args)
|
||||
{
|
||||
// Let's not create ghosts if not in the middle of the round.
|
||||
if (_gameTicker.RunLevel != GameRunLevel.InRound)
|
||||
if (_gameTicker.RunLevel == GameRunLevel.PreRoundLobby)
|
||||
return;
|
||||
|
||||
if (component.Mind is not { } mind)
|
||||
@@ -173,7 +173,7 @@ public sealed class MindSystem : EntitySystem
|
||||
Timer.Spawn(0, () =>
|
||||
{
|
||||
// Make extra sure the round didn't end between spawning the timer and it being executed.
|
||||
if (_gameTicker.RunLevel != GameRunLevel.InRound)
|
||||
if (_gameTicker.RunLevel == GameRunLevel.PreRoundLobby)
|
||||
return;
|
||||
|
||||
// Async this so that we don't throw if the grid we're on is being deleted.
|
||||
|
||||
Reference in New Issue
Block a user