summaryrefslogtreecommitdiffhomepage
path: root/config/menus/main.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-07-16 20:20:50 +0200
committerAki <nthirtyone@gmail.com>2017-07-16 20:20:50 +0200
commitb2c2ef1ae1300a2a2610525bf19db227d6d5e54b (patch)
treee8d66f64c8c4cf08c4e23fe311da05503dcaec27 /config/menus/main.lua
parente39c00b6e26504ba0f5fc4f0129bfceb3afe331f (diff)
downloadroflnauts-b2c2ef1ae1300a2a2610525bf19db227d6d5e54b.zip
roflnauts-b2c2ef1ae1300a2a2610525bf19db227d6d5e54b.tar.gz
roflnauts-b2c2ef1ae1300a2a2610525bf19db227d6d5e54b.tar.bz2
Music doesn't stop on transition from any-menu to main-menu
Diffstat (limited to 'config/menus/main.lua')
-rw-r--r--config/menus/main.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/menus/main.lua b/config/menus/main.lua
index 95e44ec..ae2cef2 100644
--- a/config/menus/main.lua
+++ b/config/menus/main.lua
@@ -14,8 +14,10 @@ if background == nil or not background:is(require "not.MenuBackground") then
end
-- Wait, only here?
-musicPlayer:setTrack("menu.ogg")
-musicPlayer:play()
+if musicPlayer:getCurrentTrack() ~= "menu.ogg" then
+ musicPlayer:setTrack("menu.ogg")
+ musicPlayer:play()
+end
return {
background,