Fixes overlays not clearing when using the ghost command (#1669)

* fixes overlays not clearing when ghosting

* fix gonflicts???

* actually fixes gonflicts

Co-authored-by: ancientpower <ancientpowerer@gmail.com>
This commit is contained in:
ancientpower
2020-08-14 08:13:32 -05:00
committed by GitHub
parent 47c32a1c6f
commit 9ffc134f75

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.Components.Observer;
using Content.Server.Interfaces.GameTicking;
using Content.Server.Players;
using Content.Shared.GameObjects.Components.Damage;
using Content.Shared.GameObjects.Components.Mobs;
using Robust.Server.Interfaces.Console;
using Robust.Server.Interfaces.Player;
using Robust.Shared.Interfaces.GameObjects;
@@ -67,7 +68,12 @@ namespace Content.Server.Observer
var ghostComponent = ghost.GetComponent<GhostComponent>();
ghostComponent.CanReturnToBody = canReturn;
if(canReturn)
if (player.AttachedEntity.TryGetComponent(out ServerOverlayEffectsComponent overlayComponent))
{
overlayComponent?.RemoveOverlay(SharedOverlayID.CircleMaskOverlay);
}
if (canReturn)
mind.Visit(ghost);
else
mind.TransferTo(ghost);