Fix cross grid movement (#8790)
This commit is contained in:
@@ -90,11 +90,11 @@ namespace Content.Shared.Movement
|
|||||||
|
|
||||||
var worldTotal = _relativeMovement ? parentRotation.RotateVec(total) : total;
|
var worldTotal = _relativeMovement ? parentRotation.RotateVec(total) : total;
|
||||||
|
|
||||||
if (transform.GridEntityId == EntityUid.Invalid)
|
if (transform.GridEntityId != EntityUid.Invalid)
|
||||||
mover.LastGridAngle = parentRotation;
|
mover.LastGridAngle = parentRotation;
|
||||||
|
|
||||||
if (worldTotal != Vector2.Zero)
|
if (worldTotal != Vector2.Zero)
|
||||||
transform.LocalRotation = transform.GridEntityId == EntityUid.Invalid
|
transform.LocalRotation = transform.GridEntityId != EntityUid.Invalid
|
||||||
? total.ToWorldAngle()
|
? total.ToWorldAngle()
|
||||||
: worldTotal.ToWorldAngle();
|
: worldTotal.ToWorldAngle();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user