mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
Rename 'addons' folder to 'mods' to avoid
Use onRun event to play startup music
This commit is contained in:
@@ -36,14 +36,15 @@ function Client.init()
|
||||
g_window.setIcon(resolvepath('clienticon.png'))
|
||||
g_keyboard.bindKeyDown('Ctrl+Shift+R', Client.reloadScripts)
|
||||
|
||||
addEvent(function()
|
||||
scheduleEvent(function()
|
||||
-- Play startup music (The Silver Tree, by Mattias Westlund)
|
||||
g_sounds.playMusic("/client/startup.ogg", 3)
|
||||
connect(g_game, { onGameStart = function() g_sounds.stopMusic(3) end })
|
||||
connect(g_game, { onGameEnd= function() g_sounds.playMusic("/client/startup.ogg", 3) end })
|
||||
end, 100)
|
||||
end, 0)
|
||||
connect(g_app, { onRun =
|
||||
function()
|
||||
-- Play startup music (The Silver Tree, by Mattias Westlund)
|
||||
g_sounds.playMusic("startup.ogg", 3)
|
||||
connect(g_game, { onGameStart = function() g_sounds.stopMusic(3) end })
|
||||
connect(g_game, { onGameEnd = function() g_sounds.playMusic("startup.ogg", 3) end })
|
||||
end
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
function Client.terminate()
|
||||
|
Reference in New Issue
Block a user