[debug menu] change: toggle BGM also when the debug menu is open

Also:
- remove unused `L + Right` and `L + Up` controls for debug puppets
This commit is contained in:
Robin C. Ladiges 2024-07-02 19:25:28 +02:00
parent 56350afa04
commit 7cd46d2f29
No known key found for this signature in database
GPG key ID: B494D3DF92661B99

View file

@ -445,39 +445,10 @@ bool hakoniwaSequenceHook(HakoniwaSequence* sequence) {
if (al::isPadTriggerLeft(-1)) { // L + Left => Activate gamemode if (al::isPadTriggerLeft(-1)) { // L + Left => Activate gamemode
GameModeManager::instance()->toggleActive(); GameModeManager::instance()->toggleActive();
} }
if (al::isPadTriggerRight(-1)) { if (al::isPadTriggerUp(-1)) { // L + Up => Disable background music
if (debugMode) {
PuppetInfo* debugPuppet = Client::getDebugPuppetInfo();
if (debugPuppet) {
debugPuppet->playerPos = al::getTrans(playerBase);
al::calcQuat(&debugPuppet->playerRot, playerBase);
PlayerHackKeeper* hackKeeper = playerBase->getPlayerHackKeeper();
if (hackKeeper) {
const char* hackName = hackKeeper->getCurrentHackName();
debugPuppet->isCaptured = hackName != nullptr;
if (debugPuppet->isCaptured) {
strcpy(debugPuppet->curHack, hackName);
} else {
strcpy(debugPuppet->curHack, "");
}
}
}
}
}
if (al::isPadTriggerUp(-1)) {
if (debugMode) {
PuppetActor* debugPuppet = Client::getDebugPuppet();
if (debugPuppet) {
debugPuppet->emitJoinEffect();
}
} else { // L + Up => Disable background music
isDisableMusic = !isDisableMusic; isDisableMusic = !isDisableMusic;
} }
} }
}
if (isDisableMusic) { if (isDisableMusic) {
if (al::isPlayingBgm(stageScene)) { if (al::isPlayingBgm(stageScene)) {