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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user