From c2e328e5ae74c269d9bd572c505e55e40a8e0f69 Mon Sep 17 00:00:00 2001 From: zumorica Date: Fri, 17 Apr 2020 19:23:06 +0200 Subject: [PATCH] Turns out we don't need to spawn a timer to delete ghosts anymore --- Content.Server/Administration/AGhost.cs | 2 +- .../GameObjects/Components/Observer/GhostComponent.cs | 2 +- Content.Server/Observer/Ghost.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Content.Server/Administration/AGhost.cs b/Content.Server/Administration/AGhost.cs index f4eb9fca29..3eff686aef 100644 --- a/Content.Server/Administration/AGhost.cs +++ b/Content.Server/Administration/AGhost.cs @@ -29,7 +29,7 @@ namespace Content.Server.Administration { var visiting = mind.VisitingEntity; mind.UnVisit(); - Timer.Spawn(100, visiting.Delete); + visiting.Delete(); } else { diff --git a/Content.Server/GameObjects/Components/Observer/GhostComponent.cs b/Content.Server/GameObjects/Components/Observer/GhostComponent.cs index a829ad5987..bcb1365b56 100644 --- a/Content.Server/GameObjects/Components/Observer/GhostComponent.cs +++ b/Content.Server/GameObjects/Components/Observer/GhostComponent.cs @@ -50,7 +50,7 @@ namespace Content.Server.GameObjects.Components.Observer if (netChannel == null || netChannel == actor.playerSession.ConnectedClient) { actor.playerSession.ContentData().Mind.UnVisit(); - Timer.Spawn(100, Owner.Delete); + Owner.Delete(); } break; case PlayerAttachedMsg msg: diff --git a/Content.Server/Observer/Ghost.cs b/Content.Server/Observer/Ghost.cs index c87581f3d3..12696ef85d 100644 --- a/Content.Server/Observer/Ghost.cs +++ b/Content.Server/Observer/Ghost.cs @@ -38,7 +38,7 @@ namespace Content.Server.Observer if (mind.VisitingEntity != null) { mind.UnVisit(); - Timer.Spawn(100, mind.VisitingEntity.Delete); + mind.VisitingEntity.Delete(); } var position = player.AttachedEntity?.Transform.GridPosition ?? IoCManager.Resolve().GetObserverSpawnPoint();