Skip to content

Commit fca62c5

Browse files
committed
Fix Freecam vertical input
1 parent 5a46861 commit fca62c5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

common/src/main/kotlin/com/lambda/module/modules/player/Freecam.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ object Freecam : Module(
9494

9595
val inputVec = Vec3d(
9696
input.movementSideways.toDouble(),
97-
verticalMovement.toDouble(),
97+
input.verticalMovement.toDouble(),
9898
input.movementForward.toDouble()
9999
)
100100

common/src/main/kotlin/com/lambda/util/player/MovementUtils.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,16 @@ object MovementUtils {
2626
pressingBack = false
2727
pressingLeft = false
2828
pressingRight = false
29+
30+
jumping = false
31+
sneaking = false
2932
}
3033

3134
val SafeContext.isInputting: Boolean get() =
3235
roundedForward != 0f || roundedStrafing != 0f
3336

34-
val SafeContext.verticalMovement get() =
35-
player.input.jumping.toInt() - player.input.sneaking.toInt()
37+
val Input.verticalMovement get() =
38+
jumping.toInt() - sneaking.toInt()
3639

3740
fun SafeContext.calcMoveYaw(
3841
yawIn: Float = player.moveYaw,

0 commit comments

Comments
 (0)