Fix H-pulling? (#4425)
In retrospect the answer is easy, but man this took a while.
This commit is contained in:
@@ -62,7 +62,6 @@ namespace Content.Shared.Pulling
|
||||
|
||||
CommandBinds.Builder
|
||||
.Bind(ContentKeyFunctions.MovePulledObject, new PointerInputCmdHandler(HandleMovePulledObject))
|
||||
.Bind(ContentKeyFunctions.ReleasePulledObject, InputCmdHandler.FromDelegate(HandleReleasePulledObject))
|
||||
.Register<SharedPullingSystem>();
|
||||
}
|
||||
|
||||
@@ -194,28 +193,6 @@ namespace Content.Shared.Pulling
|
||||
return false;
|
||||
}
|
||||
|
||||
private void HandleReleasePulledObject(ICommonSession? session)
|
||||
{
|
||||
var player = session?.AttachedEntity;
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryGetPulled(player, out var pulled))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!pulled.TryGetComponent(out SharedPullableComponent? pullable))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pullable.TryStopPull();
|
||||
}
|
||||
|
||||
private void SetPuller(IEntity puller, IEntity pulled)
|
||||
{
|
||||
_pullers[puller] = pulled;
|
||||
|
||||
Reference in New Issue
Block a user