mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 19:24:01 +02:00
Merge pull request #1170 from thibautbus/fix/resume-boot-music
Fix lingering title music after Resume Game
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user