Fix can't return to body bug (#4424)

This commit is contained in:
mirrorcult
2021-08-06 00:02:36 -07:00
committed by GitHub
parent db65ed5536
commit 09f5ec5cb8
6 changed files with 16 additions and 25 deletions

View File

@@ -13,6 +13,7 @@ using Content.Server.Roles;
using Content.Server.Spawners.Components;
using Content.Server.Speech.Components;
using Content.Shared.GameTicking;
using Content.Shared.Ghost;
using Content.Shared.Inventory;
using Content.Shared.Preferences;
using Content.Shared.Roles;
@@ -144,7 +145,8 @@ namespace Content.Server.GameTicking
var mob = SpawnObserverMob();
mob.Name = name;
mob.GetComponent<GhostComponent>().CanReturnToBody = false;
var ghost = mob.GetComponent<GhostComponent>();
EntitySystem.Get<SharedGhostSystem>().SetCanReturnToBody(ghost, false);
data.Mind.TransferTo(mob);
_playersInLobby[player] = LobbyPlayerStatus.Observer;