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