File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
src/main/kotlin/com/lambda/module/modules/render Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1818package com.lambda.module.modules.render
1919
2020import com.lambda.Lambda
21+ import com.lambda.Lambda.mc
2122import com.lambda.event.events.PlayerEvent
2223import com.lambda.event.listener.SafeListener.Companion.listen
2324import 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 }
You can’t perform that action at this time.
0 commit comments