diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index a0c35218..4362fac5 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -911,12 +911,22 @@ (assoc-in [:fade :opacity] 1.0))) entities)) +(defn get-necessary-sound [anim-sound-frames previous-frame-index current-frame-index] + (loop [x (inc previous-frame-index)] + (cond + (anim-sound-frames x) + (anim-sound-frames x) + + (< x current-frame-index ) + (recur (inc x)) + + :else + nil))) + (defn play-sound-if-necessary [screen entities target {:keys [previous-frame-index current-frame-index anim-sound-frames anim x y] :as e :or {anim-sound-frames {}}}] - - (if (and (not= previous-frame-index current-frame-index) (anim-sound-frames anim)) - (if-let [[snd vol-scale pitch] (get-in anim-sound-frames [anim current-frame-index])] + (if-let [[snd vol-scale pitch] (get-necessary-sound (anim-sound-frames anim) previous-frame-index current-frame-index)] (let [snd (if (fn? snd) (snd entities) snd) diff --git a/ios/Info.plist.xml b/ios/Info.plist.xml index a56931eb..645efe3f 100644 --- a/ios/Info.plist.xml +++ b/ios/Info.plist.xml @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 124 + 126 MinimumOSVersion 8.0 LSRequiresIPhoneOS