Remove IActionBlocker.CanMove (#4449)
* Remove IActionBlocker.CanMove Ported the remainders over to using MovementAttemptEvent which should also help make mob movement a bit faster. * Make that check faster
This commit is contained in:
@@ -25,16 +25,6 @@ namespace Content.Shared.ActionBlocker
|
||||
var ev = new MovementAttemptEvent(entity);
|
||||
|
||||
RaiseLocalEvent(entity.Uid, ev);
|
||||
|
||||
foreach (var blocker in entity.GetAllComponents<IActionBlocker>())
|
||||
{
|
||||
if (!blocker.CanMove())
|
||||
{
|
||||
ev.Cancel();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return !ev.Cancelled;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user