* Remove IActionBlocker.CanMove Ported the remainders over to using MovementAttemptEvent which should also help make mob movement a bit faster. * Make that check faster
21 lines
582 B
C#
21 lines
582 B
C#
using Content.Shared.Movement;
|
|
using Robust.Shared.GameObjects;
|
|
|
|
namespace Content.Shared.Climbing
|
|
{
|
|
public abstract class SharedClimbSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<SharedClimbingComponent, MovementAttemptEvent>(HandleMoveAttempt);
|
|
}
|
|
|
|
private void HandleMoveAttempt(EntityUid uid, SharedClimbingComponent component, MovementAttemptEvent args)
|
|
{
|
|
if (component.OwnerIsTransitioning)
|
|
args.Cancel();
|
|
}
|
|
}
|
|
}
|