]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix FTL arrival deleting ghosts (#21778)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sun, 19 Nov 2023 22:37:53 +0000 (09:37 +1100)
committerGitHub <noreply@github.com>
Sun, 19 Nov 2023 22:37:53 +0000 (14:37 -0800)
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs

index e19d88b1c29589e8abe45c96e2f027b4a6556199..87813e88b2ef5c670fa68c25e6d98565374bc40c 100644 (file)
@@ -7,6 +7,7 @@ using Content.Server.Station.Systems;
 using Content.Shared.Body.Components;
 using Content.Shared.Buckle.Components;
 using Content.Shared.Doors.Components;
+using Content.Shared.Ghost;
 using Content.Shared.Maps;
 using Content.Shared.Parallax;
 using Content.Shared.Shuttles.Components;
@@ -77,6 +78,7 @@ public sealed partial class ShuttleSystem
 
     private EntityQuery<BodyComponent> _bodyQuery;
     private EntityQuery<BuckleComponent> _buckleQuery;
+    private EntityQuery<GhostComponent> _ghostQuery;
     private EntityQuery<PhysicsComponent> _physicsQuery;
     private EntityQuery<StatusEffectsComponent> _statusQuery;
     private EntityQuery<TransformComponent> _xformQuery;
@@ -85,6 +87,7 @@ public sealed partial class ShuttleSystem
     {
         _bodyQuery = GetEntityQuery<BodyComponent>();
         _buckleQuery = GetEntityQuery<BuckleComponent>();
+        _ghostQuery = GetEntityQuery<GhostComponent>();
         _physicsQuery = GetEntityQuery<PhysicsComponent>();
         _statusQuery = GetEntityQuery<StatusEffectsComponent>();
         _xformQuery = GetEntityQuery<TransformComponent>();
@@ -718,6 +721,11 @@ public sealed partial class ShuttleSystem
                     continue;
                 }
 
+                if (_ghostQuery.HasComponent(ent))
+                {
+                    continue;
+                }
+
                 if (_bodyQuery.TryGetComponent(ent, out var mob))
                 {
                     var gibs = _bobby.GibBody(ent, body: mob);