From 9ffc134f75f4f3bbc8529e368b09aeb662094f22 Mon Sep 17 00:00:00 2001 From: ancientpower Date: Fri, 14 Aug 2020 08:13:32 -0500 Subject: [PATCH] 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 --- Content.Server/Observer/Ghost.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Content.Server/Observer/Ghost.cs b/Content.Server/Observer/Ghost.cs index 493ac615b9..80480b958a 100644 --- a/Content.Server/Observer/Ghost.cs +++ b/Content.Server/Observer/Ghost.cs @@ -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.CanReturnToBody = canReturn; - if(canReturn) + if (player.AttachedEntity.TryGetComponent(out ServerOverlayEffectsComponent overlayComponent)) + { + overlayComponent?.RemoveOverlay(SharedOverlayID.CircleMaskOverlay); + } + + if (canReturn) mind.Visit(ghost); else mind.TransferTo(ghost);