Skip to content

Commit 1285ae0

Browse files
committed
only snap to area if the players current rotation isn't in the desired direction
1 parent 6bf0c26 commit 1285ae0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/kotlin/com/lambda/interaction/request/rotating/visibilty/RotationTargets.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,8 @@ fun lookInDirection(direction: PlaceDirection) =
5656
RotationTarget(null, {
5757
PlaceDirection.fromRotation(RotationManager.activeRotation) == direction
5858
}) {
59-
if (!direction.isInArea(RotationManager.activeRotation) || !direction.isInArea(player.rotation)) {
60-
direction.snapToArea(RotationManager.activeRotation)
61-
} else {
62-
player.rotation
63-
}
59+
if (!direction.isInArea(player.rotation)) direction.snapToArea(RotationManager.activeRotation)
60+
else player.rotation
6461
}
6562

6663
/**

0 commit comments

Comments
 (0)