Skip to content

Commit 1b707f0

Browse files
committed
fix issue with minDiagonalAngle not working consistently
1 parent d16aa98 commit 1b707f0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/kotlin/com/lambda/module/modules/movement/elytrafly/modes/BounceElytraFly.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ class BounceElytraFly(
7474
context(safeContext: SafeContext)
7575
private val yMotion
7676
get() = yMotionSetting &&
77-
(!onlyOnDiagonal || abs(RotationManager.activeRotation.yaw % 90) > minDiagonalAngle) &&
77+
(!onlyOnDiagonal || run {
78+
val normalised = abs(RotationManager.activeRotation.yaw % 90)
79+
normalised > minDiagonalAngle && normalised < 90 - minDiagonalAngle
80+
}) &&
7881
safeContext.player.isOnGround &&
7982
safeContext.player.isGliding &&
8083
Speedometer.calculateSpeed(true, SpeedUnit.BlocksPerSecond).let { speed ->

0 commit comments

Comments
 (0)