Today I join Zumorica in leaving behind our crimes against humanity (#2396)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user