From 95062c9786b8f77b4aa723c7759263caf4e2c4aa Mon Sep 17 00:00:00 2001 From: ImToggle <98242902+ImToggle@users.noreply.github.com> Date: Thu, 29 Aug 2024 19:47:35 +0800 Subject: [PATCH] fixed chat peek randomly scrolls --- src/main/kotlin/org/polyfrost/chatting/Chatting.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/org/polyfrost/chatting/Chatting.kt b/src/main/kotlin/org/polyfrost/chatting/Chatting.kt index 1d61570..44ec3b7 100644 --- a/src/main/kotlin/org/polyfrost/chatting/Chatting.kt +++ b/src/main/kotlin/org/polyfrost/chatting/Chatting.kt @@ -173,6 +173,8 @@ object Chatting { } } + var canScroll = true + val key = ChattingConfig.chatPeekBind if (key.isActive != lastPressed && ChattingConfig.chatPeek) { lastPressed = key.isActive @@ -181,6 +183,7 @@ object Chatting { } else if (!ChattingConfig.peekMode) { peeking = false } + canScroll = false if (!peeking) mc.ingameGUI.chatGUI.resetScroll() } @@ -196,7 +199,7 @@ object Chatting { } shouldSmooth = true - mc.ingameGUI.chatGUI.scroll(i) + if (canScroll) mc.ingameGUI.chatGUI.scroll(i) } } }