diff options
Diffstat (limited to 'src/sound.lua')
| -rw-r--r-- | src/sound.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sound.lua b/src/sound.lua index 4d31861..6ebe403 100644 --- a/src/sound.lua +++ b/src/sound.lua @@ -16,12 +16,14 @@ function load_sounds_from(path) size = 1, [1] = la.newSource(filepath, "static"), } + sound_bank[filepath][1]:setRelative(true) + sound_bank[filepath][1]:setPosition(0, 0, 0) end end end end -function play_sound(path) +function play_sound(path, x, y) sound = sound_bank[path] local source = nil @@ -35,5 +37,6 @@ function play_sound(path) sound[sound.size] = sound[1]:clone() source = sound[sound.size] end + source:setPosition(x or 0, y or 0, 0) la.play(source) end |
