Skip to content

Commit

Permalink
fix resetting levels during level end animation
Browse files Browse the repository at this point in the history
  • Loading branch information
dankmeme01 committed Feb 1, 2024
1 parent bb402d2 commit 85ed441
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UILayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
Expand Down

0 comments on commit 85ed441

Please sign in to comment.