From 4be70b7d55493cdc2d5e909d5101e70a16bee6f1 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 27 Feb 2021 12:18:22 -0500 Subject: Added underwater music and fixed music not changing bug --- res/maps/underwater_start.tmx | 3 +++ res/music/barren_factory.wav | Bin 0 -> 8063540 bytes res/scripts/common.lua | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 res/music/barren_factory.wav diff --git a/res/maps/underwater_start.tmx b/res/maps/underwater_start.tmx index 161bb3e..7f9cb8c 100644 --- a/res/maps/underwater_start.tmx +++ b/res/maps/underwater_start.tmx @@ -1,5 +1,8 @@ + + + diff --git a/res/music/barren_factory.wav b/res/music/barren_factory.wav new file mode 100644 index 0000000..272a3fb Binary files /dev/null and b/res/music/barren_factory.wav differ diff --git a/res/scripts/common.lua b/res/scripts/common.lua index a5e7873..23b881a 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua @@ -264,7 +264,7 @@ function ChangeMap(map, warp, options) if (mixer():isPlayingMusic() and not getMap():hasMusic()) then mixer():fadeoutMusic(150) - elseif (getMap():hasMusic() and (not mixer():isPlayingMusic() or not mixer():getPlayingTrack() == getMap():getMusic())) then + elseif (getMap():hasMusic() and (not mixer():isPlayingMusic() or not (mixer():getPlayingTrack() == getMap():getMusic()))) then mixer():playMusic(getMap():getMusic(), 150) end -- cgit 1.4.1