From 12c7a30b1c98eb55e92d9443f203939a0af75b01 Mon Sep 17 00:00:00 2001 From: Fleeym <61891787+Fleeym@users.noreply.github.com> Date: Fri, 19 Apr 2024 02:29:23 +0300 Subject: [PATCH] fix the jumping flag not being reset in UILayer --- src/UILayer.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/UILayer.cpp b/src/UILayer.cpp index 56da8be..0a46db8 100644 --- a/src/UILayer.cpp +++ b/src/UILayer.cpp @@ -147,7 +147,11 @@ struct $modify(UILayer) { return ListenerResult::Propagate; } PlayLayer::get()->queueButton(1, down, false); - m_p1Jumping = true; + if (down) { + m_p1Jumping = true; + } else { + m_p1Jumping = false; + } return ListenerResult::Stop; }); this->defineKeybind("robtop.geometry-dash/jump-p2", [this](bool down) { @@ -155,7 +159,11 @@ struct $modify(UILayer) { return ListenerResult::Propagate; } PlayLayer::get()->handleButton(down, 1, false); - m_p2Jumping = true; + if (down) { + m_p2Jumping = true; + } else { + m_p2Jumping = false; + } return ListenerResult::Stop; }); this->defineKeybind("robtop.geometry-dash/place-checkpoint", [this](bool down) {