summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEblo <7004497+Eblo@users.noreply.github.com>2025-08-03 11:16:34 -0400
committerGitHub <noreply@github.com>2025-08-03 11:16:34 -0400
commitcad8a77b8c5a3e95e60673d6e089a899230fb030 (patch)
treee387d71b51d6f9ad227d15e731fd7b24fd4c0093
parent27c3822d05e85bff19c0988a533d0ff81f88376e (diff)
Fix BSoDT bugs with audio and early day change (#1228)
-rw-r--r--mm/2s2h/Enhancements/Songs/BetterSongOfDoubleTime.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/2s2h/Enhancements/Songs/BetterSongOfDoubleTime.cpp b/mm/2s2h/Enhancements/Songs/BetterSongOfDoubleTime.cpp
index ceb19e3ee..5f04c790e 100644
--- a/mm/2s2h/Enhancements/Songs/BetterSongOfDoubleTime.cpp
+++ b/mm/2s2h/Enhancements/Songs/BetterSongOfDoubleTime.cpp
@@ -136,7 +136,7 @@ void OnPlayerUpdate(Actor* actor) {
gSaveContext.respawnFlag = 2;
// Stop BGM so that new day sequences can play
- gSaveContext.seqId = (u8)NA_BGM_DISABLED;
+ gSaveContext.seqId = NA_BGM_DISABLED;
GameInteractor::Instance->UnregisterGameHookForID<GameInteractor::OnActorKill>(onEnTest6KillHookId);
onEnTest6KillHookId = 0;
@@ -226,7 +226,8 @@ void OnPlayerUpdate(Actor* actor) {
sSelectedTime = newTime;
} else if (adjustMode == ADJUST_DIRECTION_REVERSE) { // Reverse time
u16 newTime = sSelectedTime - interval;
- if (sSelectedDay == sOriginalDay && CLOCK_TIME_NORMALIZED(newTime) < CLOCK_TIME_NORMALIZED(sOriginalTime)) {
+ if (sSelectedDay == sOriginalDay && (CLOCK_TIME_NORMALIZED(newTime) < CLOCK_TIME_NORMALIZED(sOriginalTime) ||
+ interval > CLOCK_TIME_NORMALIZED(sSelectedTime))) {
newTime = sOriginalTime;
}
// Day decrementing