diff --git a/README.md b/README.md index b9b9b46a7..cd32b0c45 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin - Hanging fix (mario can grab hangable ceilings from any state, instead of only jump or double jump) * - Mario head skip * - Peach letter cutscene skip * +- Castle music fix (Fixes the castle music sometimes triggering after getting a dialog) * - Ability to easily change the warp that EXIT COURSE takes you to via config.h, or disable it entirely - Exit course while moving * - Toggle to disable fall damage and the fall damage sound * diff --git a/include/config.h b/include/config.h index 998b073fc..3356ac6fb 100644 --- a/include/config.h +++ b/include/config.h @@ -56,6 +56,8 @@ #define AUTO_LOD // Skip peach letter cutscene #define PEACH_SKIP +// Fixes the castle music sometimes triggering after getting a dialog +#define CASTLE_MUSIC_FIX // Remove course specific camera processing #define CAMERA_FIX // Increase the maximum pole length (it will treat bparam1 and bparam2 as a single value) diff --git a/src/game/level_update.c b/src/game/level_update.c index e18849cc6..977228227 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -1290,8 +1290,11 @@ s32 lvl_init_from_save_file(UNUSED s16 arg0, s32 levelNum) { #endif sWarpDest.type = WARP_TYPE_NOT_WARPING; sDelayedWarpOp = WARP_OP_NONE; +#ifdef CASTLE_MUSIC_FIX + gNeverEnteredCastle = 0; +#else gNeverEnteredCastle = !save_file_exists(gCurrSaveFileNum - 1); - +#endif gCurrLevelNum = levelNum; gCurrCourseNum = COURSE_NONE; gSavedCourseNum = COURSE_NONE;