Fix pulling lerping (#4550)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Content.Shared.MobState;
|
||||
using Content.Shared.Movement.Components;
|
||||
using Robust.Shared.Containers;
|
||||
@@ -49,7 +50,7 @@ namespace Content.Shared.Movement.EntitySystems
|
||||
|
||||
if (owner != null && session != null)
|
||||
{
|
||||
foreach (var comp in owner.GetAllComponents<IRelayMoveInput>())
|
||||
foreach (var comp in owner.GetAllComponents<IRelayMoveInput>().ToArray())
|
||||
{
|
||||
comp.MoveInputPressed(session);
|
||||
}
|
||||
|
||||
@@ -152,6 +152,8 @@ namespace Content.Shared.Movement
|
||||
{
|
||||
return body.BodyStatus == BodyStatus.OnGround &&
|
||||
body.Owner.HasComponent<IMobStateComponent>() &&
|
||||
// If we're being pulled then don't mess with our velocity.
|
||||
(!body.Owner.TryGetComponent(out SharedPullableComponent? pullable) || !pullable.BeingPulled) &&
|
||||
_blocker.CanMove(body.Owner);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user