From 85ed44126b4a83e6b9af342123b5f431d2701d51 Mon Sep 17 00:00:00 2001 From: dankmeme01 <42031238+dankmeme01@users.noreply.github.com> Date: Thu, 1 Feb 2024 11:05:48 +0100 Subject: [PATCH] fix resetting levels during level end animation --- src/UILayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UILayer.cpp b/src/UILayer.cpp index b5fb502..a1f0eaf 100644 --- a/src/UILayer.cpp +++ b/src/UILayer.cpp @@ -144,12 +144,12 @@ struct $modify(UILayer) { } }); this->defineKeybind("robtop.geometry-dash/restart-level", [=](bool down) { - if (down && this->isCurrentPlayLayer() && !this->isPaused()) { + if (down && this->isCurrentPlayLayer() && !this->isPaused() && PlayLayer::get()->canPauseGame()) { PlayLayer::get()->resetLevel(); } }); this->defineKeybind("robtop.geometry-dash/full-restart-level", [=](bool down) { - if (down && this->isCurrentPlayLayer() && !this->isPaused()) { + if (down && this->isCurrentPlayLayer() && !this->isPaused() && PlayLayer::get()->canPauseGame()) { PlayLayer::get()->fullReset(); } });