Fix FTL arrival deleting ghosts (#21778)

This commit is contained in:
metalgearsloth
2023-11-20 09:37:53 +11:00
committed by GitHub
parent d16ffc9337
commit 73a33c455a

View 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);