remove DeferredUpdate from mover code. (#13198)
This commit is contained in:
@@ -271,10 +271,10 @@ namespace Content.Shared.Movement.Systems
|
||||
|
||||
if (worldTotal != Vector2.Zero)
|
||||
{
|
||||
// This should have its event run during island solver soooo
|
||||
xform.DeferUpdates = true;
|
||||
xform.WorldRotation = worldTotal.ToWorldAngle();
|
||||
xform.DeferUpdates = false;
|
||||
var worldRot = _transform.GetWorldRotation(xform);
|
||||
_transform.SetLocalRotation(xform, xform.LocalRotation + worldTotal.ToWorldAngle() - worldRot);
|
||||
// TODO apparently this results in a duplicate move event because "This should have its event run during
|
||||
// island solver"??. So maybe SetRotation needs an argument to avoid raising an event?
|
||||
|
||||
if (!weightless && TryComp<MobMoverComponent>(mover.Owner, out var mobMover) &&
|
||||
TryGetSound(weightless, mover, mobMover, xform, out var sound))
|
||||
|
||||
Reference in New Issue
Block a user