diff --git a/binaries/data/mods/public/gui/common/functions_utility_music.js b/binaries/data/mods/public/gui/common/functions_utility_music.js index 49eb8c8ea7..9400adc35e 100644 --- a/binaries/data/mods/public/gui/common/functions_utility_music.js +++ b/binaries/data/mods/public/gui/common/functions_utility_music.js @@ -1,6 +1,6 @@ /* DESCRIPTION : Audio functions (eg "pick a random sound from a list", "build a playlist") go here. - NOTES : + NOTES : */ // ==================================================================== @@ -33,7 +33,7 @@ function newRandomSound(soundType, soundSubType, soundPrePath) case "music": var randomSoundPath = "audio/music/" break; - case "voice": + case "effect": randomSoundPath = soundPrePath + "/"; break; default: @@ -80,7 +80,7 @@ function fadeIn (soundHandle, finalGain, fadeDuration) // Adjust the gain of a sound from zero up to the given value. soundHandle.fade(0, finalGain, fadeDuration) - return true; + return true; } // ==================================================================== diff --git a/binaries/data/mods/public/gui/pregame/mainmenu.js b/binaries/data/mods/public/gui/pregame/mainmenu.js index 154f007b31..bbabb9d173 100644 --- a/binaries/data/mods/public/gui/pregame/mainmenu.js +++ b/binaries/data/mods/public/gui/pregame/mainmenu.js @@ -27,10 +27,10 @@ function scrollBackgrounds() // Offset the layers by oscillating amounts var t = (t0 - new Date) / 1000; - var speed = 1/10; - var off1 = 0.10 * w * (1+Math.cos(t*speed)); - var off2 = 0.18 * w * (1+Math.cos(t*speed)) - h*6/9; - var off3 = 0.20 * w * (1+Math.cos(t*speed)); + var speed = 1/20; + var off1 = 0.02 * w * (1+Math.cos(t*speed)); + var off2 = 0.12 * w * (1+Math.cos(t*speed)) - h*6/9; + var off3 = 0.16 * w * (1+Math.cos(t*speed)); var left = screen.right - w * (1 + Math.ceil(screen.right / w)); layer1.size = new GUISize(left + off1, screen.top, screen.right + off1, screen.bottom); @@ -137,7 +137,7 @@ function updateMenuPosition() // Opens the menu by revealing the screen which contains the menu function openMenu(newSubmenu, position, buttonHeight, numButtons) { - var menuSound = new Sound("audio/attack/weapon/arrowfly_24.ogg"); + var menuSound = new newRandomSound("effect", "arrowfly_", "audio/attack/weapon"); if (menuSound) { menuSound.play(0);