Don't cancel pulling a corpse because the player ghosted (#8621)

* Check if pullable is dead

* Update SharedPullableSystem.cs

Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
This commit is contained in:
themias
2022-06-03 22:59:07 -04:00
committed by GitHub
parent cb8c114063
commit 4f8ee40966

View File

@@ -1,6 +1,7 @@
using Content.Shared.ActionBlocker;
using Content.Shared.Movement.EntitySystems;
using Content.Shared.Pulling.Components;
using Content.Shared.MobState.Components;
namespace Content.Shared.Pulling.Systems
{
@@ -19,6 +20,7 @@ namespace Content.Shared.Pulling.Systems
{
var entity = args.Session.AttachedEntity;
if (entity == null || !_blocker.CanMove(entity.Value)) return;
if (TryComp<MobStateComponent>(component.Owner, out var mobState) && mobState.IsIncapacitated()) return;
_pullSystem.TryStopPull(component);
}
}