From 937e53575f710c118bbfeff7f7f65809fcd21290 Mon Sep 17 00:00:00 2001 From: 1zuna <1zuna@ccbluex.net> Date: Fri, 15 Nov 2024 15:29:02 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: be4dev <134231803+be4dev@users.noreply.github.com> --- .../features/module/modules/combat/ModuleKeepSprint.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/combat/ModuleKeepSprint.kt b/src/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/combat/ModuleKeepSprint.kt index 23d645bf714..09723a35246 100644 --- a/src/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/combat/ModuleKeepSprint.kt +++ b/src/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/combat/ModuleKeepSprint.kt @@ -40,12 +40,12 @@ object ModuleKeepSprint : Module("KeepSprint", Category.COMBAT) { @Suppress("unused") private val postTickHandler = handler { - sprinting = mc.player?.isSprinting ?: false + sprinting = player.isSprinting } fun getMotion(): Double { return when { - mc.player?.hurtTime in hurtTicks -> motionWhenHurt + player.hurtTime in hurtTicks -> motionWhenHurt else -> motion }.random() / 100.0 }