ActionBlocker CanMove uses EntityUid exclusively

This commit is contained in:
Vera Aguilera Puerto
2021-11-09 13:15:55 +01:00
parent 1f9e1c033f
commit 5f9cfaac43
10 changed files with 19 additions and 24 deletions

View File

@@ -4,11 +4,11 @@ namespace Content.Shared.Movement
{
public class MovementAttemptEvent : CancellableEntityEventArgs
{
public MovementAttemptEvent(IEntity entity)
public MovementAttemptEvent(EntityUid uid)
{
Entity = entity;
Uid = uid;
}
public IEntity Entity { get; }
public EntityUid Uid { get; }
}
}

View File

@@ -163,7 +163,7 @@ namespace Content.Shared.Movement
body.Owner.HasComponent<MobStateComponent>() &&
// If we're being pulled then don't mess with our velocity.
(!body.Owner.TryGetComponent(out SharedPullableComponent? pullable) || !pullable.BeingPulled) &&
_blocker.CanMove(body.Owner);
_blocker.CanMove(body.OwnerUid);
}
/// <summary>