Fix pulled physics objects not being woken up when the puller moves (#1720)

This commit is contained in:
DrSmugleaf
2020-08-16 21:08:05 +02:00
committed by GitHub
parent 3293dc4459
commit 9fb6afd08b
2 changed files with 26 additions and 0 deletions

View File

@@ -42,6 +42,8 @@ namespace Content.Shared.Physics.Pull
return;
}
ControlledComponent.WakeBody();
var message = new PullStartedMessage(this, _puller, ControlledComponent);
_puller.Owner.SendMessage(null, message);
@@ -64,6 +66,8 @@ namespace Content.Shared.Physics.Pull
return;
}
ControlledComponent.WakeBody();
var message = new PullStoppedMessage(this, oldPuller, ControlledComponent);
oldPuller.Owner.SendMessage(null, message);
@@ -86,6 +90,8 @@ namespace Content.Shared.Physics.Pull
return;
}
ControlledComponent.WakeBody();
var dist = _puller.Owner.Transform.GridPosition.Position - to.Position;
if (Math.Sqrt(dist.LengthSquared) > DistBeforeStopPull ||