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