Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiLko authored Jan 30, 2024
1 parent 975caa2 commit cb22e1c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit cb22e1c

Please sign in to comment.