Fix more movement-rotation issues (#7016)
This commit is contained in:
@@ -86,7 +86,9 @@ namespace Content.Shared.Movement
|
|||||||
mover.LastGridAngle = parentRotation;
|
mover.LastGridAngle = parentRotation;
|
||||||
|
|
||||||
if (worldTotal != Vector2.Zero)
|
if (worldTotal != Vector2.Zero)
|
||||||
transform.WorldRotation = worldTotal.GetDir().ToAngle();
|
transform.LocalRotation = transform.GridID != GridId.Invalid
|
||||||
|
? total.ToWorldAngle()
|
||||||
|
: worldTotal.ToWorldAngle();
|
||||||
|
|
||||||
_physics.SetLinearVelocity(physicsComponent, worldTotal);
|
_physics.SetLinearVelocity(physicsComponent, worldTotal);
|
||||||
}
|
}
|
||||||
@@ -149,7 +151,9 @@ namespace Content.Shared.Movement
|
|||||||
{
|
{
|
||||||
// This should have its event run during island solver soooo
|
// This should have its event run during island solver soooo
|
||||||
xform.DeferUpdates = true;
|
xform.DeferUpdates = true;
|
||||||
xform.LocalRotation = total.GetDir().ToAngle();
|
xform.LocalRotation = xform.GridID != GridId.Invalid
|
||||||
|
? total.ToWorldAngle()
|
||||||
|
: worldTotal.ToWorldAngle();
|
||||||
xform.DeferUpdates = false;
|
xform.DeferUpdates = false;
|
||||||
HandleFootsteps(mover, mobMover);
|
HandleFootsteps(mover, mobMover);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user