Today I join Zumorica in leaving behind our crimes against humanity (#2396)

This commit is contained in:
DrSmugleaf
2020-10-26 12:11:46 +01:00
committed by GitHub
parent ebe8a82033
commit 70867d88cc
2 changed files with 21 additions and 24 deletions

View File

@@ -146,26 +146,6 @@ namespace Content.Shared.GameObjects.Components.Pulling
return controller.TryMoveTo(Puller.Transform.Coordinates, to);
}
private void PullerMoved(MoveEvent moveEvent)
{
if (Puller == null)
{
return;
}
if (moveEvent.Sender != Puller)
{
return;
}
if (!Owner.TryGetComponent(out IPhysicsComponent? physics))
{
return;
}
physics.WakeBody();
}
public override ComponentState GetComponentState()
{
return new PullableComponentState(Puller?.Uid);
@@ -202,13 +182,9 @@ namespace Content.Shared.GameObjects.Components.Pulling
switch (message)
{
case PullStartedMessage msg:
Owner.EntityManager.EventBus.SubscribeEvent<MoveEvent>(EventSource.Local, this, PullerMoved);
AddPullingStatuses(msg.Puller.Owner);
break;
case PullStoppedMessage msg:
Owner.EntityManager.EventBus.UnsubscribeEvent<MoveEvent>(EventSource.Local, this);
RemovePullingStatuses(msg.Puller.Owner);
break;
}