Fix AI movement (#37114)

Don't relay blocking anymore.
This commit is contained in:
metalgearsloth
2025-05-02 20:07:12 +10:00
committed by GitHub
parent 26ebf06b81
commit 51bff89b23
3 changed files with 10 additions and 10 deletions

View File

@@ -2,6 +2,7 @@ using Content.Shared.Hands;
using Content.Shared.Interaction.Components;
using Content.Shared.Interaction.Events;
using Content.Shared.Item;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Events;
namespace Content.Shared.Interaction;
@@ -13,7 +14,7 @@ namespace Content.Shared.Interaction;
/// </summary>
public partial class SharedInteractionSystem
{
public void InitializeBlocking()
private void InitializeBlocking()
{
SubscribeLocalEvent<BlockMovementComponent, UpdateCanMoveEvent>(OnMoveAttempt);
SubscribeLocalEvent<BlockMovementComponent, UseAttemptEvent>(CancelEvent);
@@ -34,7 +35,8 @@ public partial class SharedInteractionSystem
private void OnMoveAttempt(EntityUid uid, BlockMovementComponent component, UpdateCanMoveEvent args)
{
if (component.LifeStage > ComponentLifeStage.Running)
// If we're relaying then don't cancel.
if (HasComp<RelayInputMoverComponent>(uid))
return;
args.Cancel(); // no more scurrying around