Fix cross grid movement (#8790)

This commit is contained in:
Leon Friedrich
2022-06-12 18:50:10 +12:00
committed by GitHub
parent 9b851c3fb3
commit 4c4bc39ae7

View File

@@ -90,11 +90,11 @@ namespace Content.Shared.Movement
var worldTotal = _relativeMovement ? parentRotation.RotateVec(total) : total;
if (transform.GridEntityId == EntityUid.Invalid)
if (transform.GridEntityId != EntityUid.Invalid)
mover.LastGridAngle = parentRotation;
if (worldTotal != Vector2.Zero)
transform.LocalRotation = transform.GridEntityId == EntityUid.Invalid
transform.LocalRotation = transform.GridEntityId != EntityUid.Invalid
? total.ToWorldAngle()
: worldTotal.ToWorldAngle();