Skip to content

Commit af0f4aa

Browse files
committed
nit
1 parent 48ea85b commit af0f4aa

File tree

1 file changed

+9
-9
lines changed
  • src/main/kotlin/com/lambda/module/modules/render

1 file changed

+9
-9
lines changed

src/main/kotlin/com/lambda/module/modules/render/FreeLook.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package com.lambda.module.modules.render
1919

2020
import com.lambda.Lambda
21+
import com.lambda.Lambda.mc
2122
import com.lambda.event.events.PlayerEvent
2223
import com.lambda.event.listener.SafeListener.Companion.listen
2324
import com.lambda.interaction.request.rotation.Rotation
@@ -46,13 +47,13 @@ object FreeLook : Module(
4647

4748
@JvmStatic
4849
fun updateCam() {
49-
Lambda.mc.gameRenderer.apply {
50-
camera.setRotation(FreeLook.camera.yawF, FreeLook.camera.pitchF)
50+
mc.gameRenderer.apply {
51+
camera.setRotation(this@FreeLook.camera.yawF, this@FreeLook.camera.pitchF)
5152
}
5253
}
5354

5455
init {
55-
previousPerspective = Lambda.mc.options.perspective
56+
previousPerspective = mc.options.perspective
5657

5758
onEnable {
5859
camera = player.rotation
@@ -67,16 +68,15 @@ object FreeLook : Module(
6768

6869
listen<PlayerEvent.ChangeLookDirection> {
6970
if (!isEnabled) return@listen
71+
7072
camera = camera.withDelta(
7173
it.deltaYaw * SENSITIVITY_FACTOR,
7274
it.deltaPitch * SENSITIVITY_FACTOR
7375
)
74-
if (enablePitch) {
75-
player.pitch = camera.pitchF
76-
}
77-
if (enableYaw) {
78-
player.yaw = camera.yawF
79-
}
76+
77+
if (enablePitch) player.pitch = camera.pitchF
78+
if (enableYaw) player.yaw = camera.yawF
79+
8080
it.cancel()
8181
}
8282
}

0 commit comments

Comments
 (0)