mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-12-06 08:02:47 +00:00
Fix sequenced background music when set in ON_LEVEL_INIT (#1011)
--------- Co-authored-by: MysterD <myster@d>
This commit is contained in:
parent
708d67336d
commit
48bfef7d87
1 changed files with 6 additions and 4 deletions
|
|
@ -250,13 +250,10 @@ static void *DynOS_Warp_UpdateWarp(void *aCmd, bool aIsLevelInitDone) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set music
|
// Set music
|
||||||
if (sDynosWarpNodeNum == -1 || (sWarpDest.type != WARP_TYPE_SAME_AREA && sWarpDest.type != WARP_TYPE_NOT_WARPING)) {
|
if ((sWarpDest.type != WARP_TYPE_SAME_AREA && sWarpDest.type != WARP_TYPE_NOT_WARPING)) {
|
||||||
if (gCurrentArea != NULL) {
|
if (gCurrentArea != NULL) {
|
||||||
set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0);
|
set_background_music(gCurrentArea->musicParam, gCurrentArea->musicParam2, 0);
|
||||||
}
|
}
|
||||||
if (gMarioState->flags & MARIO_METAL_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.metalCapSequence));
|
|
||||||
if (gMarioState->flags & MARIO_VANISH_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.vanishCapSequence));
|
|
||||||
if (gMarioState->flags & MARIO_WING_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.wingCapSequence));
|
|
||||||
if (gCurrLevelNum == LEVEL_BOWSER_1 ||
|
if (gCurrLevelNum == LEVEL_BOWSER_1 ||
|
||||||
gCurrLevelNum == LEVEL_BOWSER_2 ||
|
gCurrLevelNum == LEVEL_BOWSER_2 ||
|
||||||
gCurrLevelNum == LEVEL_BOWSER_3) {
|
gCurrLevelNum == LEVEL_BOWSER_3) {
|
||||||
|
|
@ -264,6 +261,11 @@ static void *DynOS_Warp_UpdateWarp(void *aCmd, bool aIsLevelInitDone) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enable power-up cap music
|
||||||
|
if (gMarioState->flags & MARIO_METAL_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.metalCapSequence));
|
||||||
|
if (gMarioState->flags & MARIO_VANISH_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.vanishCapSequence));
|
||||||
|
if (gMarioState->flags & MARIO_WING_CAP) play_cap_music(SEQUENCE_ARGS(4, gLevelValues.wingCapSequence));
|
||||||
|
|
||||||
// lua hooks
|
// lua hooks
|
||||||
smlua_call_event_hooks(HOOK_ON_WARP, sBackupWarpDest.type, sDynosWarpLevelNum, sDynosWarpAreaNum, sDynosWarpNodeNum, sBackupWarpDest.arg);
|
smlua_call_event_hooks(HOOK_ON_WARP, sBackupWarpDest.type, sDynosWarpLevelNum, sDynosWarpAreaNum, sDynosWarpNodeNum, sBackupWarpDest.arg);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue