From 31c6a0883e4ae0e9093c9f51c0e663d9155e69e8 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Sat, 22 Jul 2017 08:40:47 -0700 Subject: [PATCH] slowness still updates scale --- desktop/src-common/advent/actions.clj | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 4a596d9f..d6077fb3 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -254,9 +254,9 @@ 0 (* speed (/ delta-y distance)))] (if (< distance speed) - (-> entities - (assoc-in [:room :entities target-id :x] final-x) - (assoc-in [:room :entities target-id :y] final-y)) + (update-in entities [:room :entities target-id] + #(jump-to screen entities % [final-x final-y] update-baseline?)) + (update-in entities [:room :entities target-id] #(start-animation screen (assoc (jump-to screen entities % [(+ moved-x from-x) (+ moved-y from-y)] update-baseline?) @@ -379,16 +379,15 @@ (do (swap! targets-left rest) (recur (-> entities - (assoc-in [:room :entities target-id :x] target-x) - (assoc-in [:room :entities target-id :y] target-y) + + (update-in [:room :entities target-id] #(jump-to screen entities % [target-x target-y] true)) (assoc-in [:step-particles :x] target-x) (assoc-in [:step-particles :y] target-y)) (- base-speed distance))) :else (-> entities - (assoc-in [:room :entities target-id :x] target-x) - (assoc-in [:room :entities target-id :y] target-y) + (update-in [:room :entities target-id] #(jump-to screen entities % [target-x target-y] true)) (assoc-in [:step-particles :x] target-x) (assoc-in [:step-particles :y] target-y)))))))