enabled sounds.

This commit is contained in:
2015-11-11 21:39:15 -08:00
parent 81c5f3e094
commit 1af249754e
4 changed files with 16 additions and 6 deletions

View File

@@ -711,7 +711,7 @@ void main ()
110 [:blink 0.15]
143 [:blink 0.15]
176 [:blink 0.15]
200 [:scratch-sound 0.2]
200 [:scratch-sound 0.15]
}
(get-in ego [:right :stand]) {11 [:blink 0.15]
@@ -720,7 +720,7 @@ void main ()
110 [:blink 0.15]
143 [:blink 0.15]
176 [:blink 0.15]
200 [:scratch-sound 0.2]
200 [:scratch-sound 0.15]
}
(get-in ego [:left :sigh]) {3 [:sigh-sound 0.4]}
(get-in ego [:right :sigh]) {3 [:sigh-sound 0.4]}
@@ -870,10 +870,13 @@ void main ()
(if-let [[snd vol-scale pitch] (get-in anim-sound-frames [anim current-frame-index])]
(let [snd (if (fn? snd)
(snd entities)
snd)]
snd)
vol-scale (if (fn? vol-scale)
vol-scale
(utils/sourced-volume-fn target vol-scale [x y]))]
(utils/play-sound! screen entities
(or (snd e) snd)
(utils/sourced-volume-fn target vol-scale [x y])
vol-scale
(utils/get-sound-pan x)
:once
pitch))