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

@@ -1,6 +1,7 @@
using Content.Server.GameTicking;
using Content.Server.Ghost.Components;
using Content.Shared.Examine;
using Content.Shared.Ghost;
using Content.Shared.MobState;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -86,7 +87,7 @@ namespace Content.Server.Mind.Components
{
if (visiting.TryGetComponent(out GhostComponent? ghost))
{
ghost.CanReturnToBody = false;
EntitySystem.Get<SharedGhostSystem>().SetCanReturnToBody(ghost, false);
}
Mind!.TransferTo(visiting);
@@ -108,7 +109,7 @@ namespace Content.Server.Mind.Components
var ghost = Owner.EntityManager.SpawnEntity("MobObserver", spawnPosition);
var ghostComponent = ghost.GetComponent<GhostComponent>();
ghostComponent.CanReturnToBody = false;
EntitySystem.Get<SharedGhostSystem>().SetCanReturnToBody(ghostComponent, false);
if (Mind != null)
{