From cb22e1ce39767103227dcccb812e55aa918c78b0 Mon Sep 17 00:00:00 2001 From: ZIlko <69888540+ZiLko@users.noreply.github.com> Date: Mon, 29 Jan 2024 22:37:53 -0600 Subject: [PATCH] Update main.cpp --- src/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b8ce9fb..a2cefc6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -461,18 +461,18 @@ class $modify(GJBaseGameLayer) { class $modify(PlayLayer) { void resetLevel() { PlayLayer::resetLevel(); - if (recorder.state != state::off) { - restart = false; + if (recorder.state != state::off && restart != false) { leftOver = 0.f; - } else if (recorder.state != state::recording) { - FMOD::ChannelGroup* channel; - FMODAudioEngine::sharedEngine()->m_system->getMasterChannelGroup(&channel); - channel->setPitch(1); + restart = false; } if (recorder.state == state::playing) { + leftOver = 0.f; recorder.currentAction = 0; releaseKeys(); + FMOD::ChannelGroup* channel; + FMODAudioEngine::sharedEngine()->m_system->getMasterChannelGroup(&channel); + channel->setPitch(1); } else if (recorder.state == state::recording) { if (this->m_isPracticeMode && !recorder.macro.empty()) { int frame = recorder.currentFrame();