Skip to content

Commit

Permalink
Merge pull request #11 from dankmeme01/main
Browse files Browse the repository at this point in the history
fix resetting levels during level end animation
  • Loading branch information
matcool authored Feb 3, 2024
2 parents bb402d2 + 85ed441 commit df36b77
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 df36b77

Please sign in to comment.