@@ -36,9 +36,9 @@ object ViewModel : Module(
3636// val shadow by setting("Shadows", true, "If disabled, removes shadows on the model") { page == Page.General }
3737
3838 private val splitScale by setting(" Split Scale" , false , " Splits left and right hand scale settings" ) { page == Page .Scale }
39- private val xScale by setting(" X Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && ! splitScale }.apply { onValueChange { _, to -> leftXScale = to; rightXScale = to } }
40- private val yScale by setting(" Y Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && ! splitScale }.apply { onValueChange { _, to -> leftYScale = to; rightYScale = to } }
41- private val zScale by setting(" Z Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && ! splitScale }.apply { onValueChange { _, to -> leftZScale = to; rightZScale = to } }
39+ private val xScale by setting(" X Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && ! splitScale }.onValueChange { _, to -> leftXScale = to; rightXScale = to }
40+ private val yScale by setting(" Y Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && ! splitScale }.onValueChange { _, to -> leftYScale = to; rightYScale = to }
41+ private val zScale by setting(" Z Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && ! splitScale }.onValueChange { _, to -> leftZScale = to; rightZScale = to }
4242 private var leftXScale by setting(" Left X Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && splitScale }
4343 private var leftYScale by setting(" Left Y Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && splitScale }
4444 private var leftZScale by setting(" Left Z Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && splitScale }
@@ -47,9 +47,9 @@ object ViewModel : Module(
4747 private var rightZScale by setting(" Right Z Scale" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Scale && splitScale }
4848
4949 private val splitPosition by setting(" Split Position" , false , " Splits left and right position settings" ) { page == Page .Position }
50- private val xPosition by setting(" X Position" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && ! splitPosition }.apply { onValueChange { _, to -> leftXPosition = to; rightXPosition = to } }
51- private val yPosition by setting(" Y Position" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && ! splitPosition }.apply { onValueChange { _, to -> leftYPosition = to; rightYPosition = to } }
52- private val zPosition by setting(" Z Position" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && ! splitPosition }.apply { onValueChange { _, to -> leftZPosition = to; rightZPosition = to } }
50+ private val xPosition by setting(" X Position" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && ! splitPosition }.onValueChange { _, to -> leftXPosition = to; rightXPosition = to }
51+ private val yPosition by setting(" Y Position" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && ! splitPosition }.onValueChange { _, to -> leftYPosition = to; rightYPosition = to }
52+ private val zPosition by setting(" Z Position" , 1.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && ! splitPosition }.onValueChange { _, to -> leftZPosition = to; rightZPosition = to }
5353 private var leftXPosition by setting(" Left X Position" , 0.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && splitPosition }
5454 private var leftYPosition by setting(" Left Y Position" , 0.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && splitPosition }
5555 private var leftZPosition by setting(" Left Z Position" , 0.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && splitPosition }
@@ -58,9 +58,9 @@ object ViewModel : Module(
5858 private var rightZPosition by setting(" Right Z Position" , 0.0f , - 1.0f .. 1.0f , 0.025f ) { page == Page .Position && splitPosition }
5959
6060 private val splitRotation by setting(" Split Rotation" , false , " Splits left and right rotation settings" ) { page == Page .Rotation }
61- private val xRotation by setting(" X Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && ! splitRotation }.apply { onValueChange { _, to -> leftXRotation = to; rightXRotation = to } }
62- private val yRotation by setting(" Y Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && ! splitRotation }.apply { onValueChange { _, to -> leftYRotation = to; rightYRotation = to } }
63- private val zRotation by setting(" Z Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && ! splitRotation }.apply { onValueChange { _, to -> leftZRotation = to; rightZRotation = to } }
61+ private val xRotation by setting(" X Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && ! splitRotation }.onValueChange { _, to -> leftXRotation = to; rightXRotation = to }
62+ private val yRotation by setting(" Y Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && ! splitRotation }.onValueChange { _, to -> leftYRotation = to; rightYRotation = to }
63+ private val zRotation by setting(" Z Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && ! splitRotation }.onValueChange { _, to -> leftZRotation = to; rightZRotation = to }
6464 private var leftXRotation by setting(" Left X Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && splitRotation }
6565 private var leftYRotation by setting(" Left Y Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && splitRotation }
6666 private var leftZRotation by setting(" Left Z Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && splitRotation }
@@ -69,8 +69,8 @@ object ViewModel : Module(
6969 private var rightZRotation by setting(" Right Z Rotation" , 0 , - 180 .. 180 , 1 ) { page == Page .Rotation && splitRotation }
7070
7171 private val splitFov by setting(" Split FOV" , false , " Splits left and right Fov settings" ) { page == Page .Fov }
72- private val fov by setting(" FOV" , 70 , 10 .. 180 , 1 ) { page == Page .Fov && ! splitFov }.apply { onValueChange { _, to -> leftFov = to; rightFov = to } }
73- private val fovAnchorDistance by setting(" Anchor Distance" , 0.5f , 0.0f .. 1.0f , 0.01f , " The distance to anchor the FOV transformation from" ) { page == Page .Fov && ! splitFov }.apply { onValueChange { _, to -> leftFovAnchorDistance = to; rightFovAnchorDistance = to } }
72+ private val fov by setting(" FOV" , 70 , 10 .. 180 , 1 ) { page == Page .Fov && ! splitFov }.onValueChange { _, to -> leftFov = to; rightFov = to }
73+ private val fovAnchorDistance by setting(" Anchor Distance" , 0.5f , 0.0f .. 1.0f , 0.01f , " The distance to anchor the FOV transformation from" ) { page == Page .Fov && ! splitFov }.onValueChange { _, to -> leftFovAnchorDistance = to; rightFovAnchorDistance = to }
7474 private var leftFov by setting(" Left FOV" , 70 , 10 .. 180 , 1 ) { page == Page .Fov && splitFov}
7575 private var leftFovAnchorDistance by setting(" Left Anchor Distance" , 0.5f , 0.0f .. 1.0f , 0.01f , " The distance to anchor the left FOV transformation from" ) { page == Page .Fov && splitFov }
7676 private var rightFov by setting(" Right FOV" , 70 , 10 .. 180 , 1 ) { page == Page .Fov && splitFov }
@@ -93,10 +93,10 @@ object ViewModel : Module(
9393
9494 init {
9595 listen<MouseEvent .Click > { event ->
96- if (event.button == mc.options.attackKey.boundKey.code) {
96+ if (event.button == mc.options.attackKey.boundKey.code)
9797 attackKeyTicksPressed = if (event.action == 0 ) - 1 else 0
98- }
9998 }
99+
100100 listen<KeyboardEvent .Press > { event ->
101101 if (event.keyCode == mc.options.attackKey.boundKey.code) {
102102 if (event.isPressed) {
@@ -108,9 +108,8 @@ object ViewModel : Module(
108108 }
109109
110110 listen<TickEvent .Pre > {
111- if (attackKeyTicksPressed != - 1 ) {
111+ if (attackKeyTicksPressed != - 1 )
112112 attackKeyTicksPressed++
113- }
114113 }
115114 }
116115
@@ -220,10 +219,11 @@ object ViewModel : Module(
220219
221220 private fun swingHand (hand : Hand , player : AbstractClientPlayerEntity ) =
222221 with (player) {
223- if ((! handSwinging || handSwingTicks >= handSwingDuration / 2 )
224- || handSwingTicks < 0
225- || (noSwingDelay && attackKeyTicksPressed <= 1 )
226- ) {
222+ if (
223+ (! handSwinging || handSwingTicks >= handSwingDuration / 2 ) ||
224+ handSwingTicks < 0 ||
225+ (noSwingDelay && attackKeyTicksPressed <= 1 ))
226+ {
227227 handSwingTicks = - 1
228228 handSwinging = true
229229 preferredHand = hand
@@ -241,4 +241,4 @@ object ViewModel : Module(
241241 private enum class SwingMode {
242242 Standard , Opposites , MainHand , OffHand , None
243243 }
244- }
244+ }
0 commit comments