Merge pull request #1170 from thibautbus/fix/resume-boot-music

Fix lingering title music after Resume Game
This commit is contained in:
bryanthaboi
2026-08-12 16:55:32 -04:00
committed by GitHub
3 changed files with 238 additions and 7 deletions
+11 -1
View File
@@ -462,8 +462,18 @@ function OverworldState:setMap(mapId, x, y, facing, opts)
if not keepMusic then
-- ..(home/overworld.asm ln 2346)
local Music = require("src.core.Music")
-- opts.freshBoot: switch instantly instead of cross-fading, like every
-- other map's PlayDefaultMusic on real hardware -- set only by
-- Game.lua's hard state teleports (onContinue, New Game, F2,
-- restoreCheckpointSave). Deliberately separate from opts.via ==
-- "boot" itself: dev tooling (src/dev/Console.lua's warp verb,
-- src/dev/HotReload.lua's reloadMap) reuses that same default for the
-- surf-restore/fresh-npc-pool branches above and must keep the
-- ordinary crossfade.
local fade = Music.MAP_FADE
if opts and opts.freshBoot then fade = nil end
Music.playMap(Game.data, mapId, Game.save.onBike, self.player.surfing,
Music.MAP_FADE)
fade)
end
-- forced bike/surf tiles fire the moment the player is placed on the