grandma
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
~@forms))
|
||||
(reset! ~entities (<!! c#)))))
|
||||
|
||||
(defn walk-straight-to [entities target-id [final-x final-y] & {:keys [update-baseline? face]}]
|
||||
(defn walk-straight-to [entities target-id [final-x final-y] & {:keys [update-baseline? face speed]}]
|
||||
(let [{start-x :x start-y :y} (get-in @entities [:room :entities target-id])
|
||||
final-x (int final-x)
|
||||
final-y (int final-y)
|
||||
@@ -103,7 +103,7 @@
|
||||
(let [delta-x (- final-x from-x)
|
||||
delta-y (- final-y from-y)
|
||||
distance (utils/dist from-x from-y final-x final-y)
|
||||
speed (* (or scale-x 1.0) 1.5)
|
||||
speed (* (or scale-x 1.0) (or speed 1.5))
|
||||
moved-x (if (= 0.0 distance)
|
||||
0
|
||||
(* speed (/ delta-x distance)))
|
||||
|
||||
Reference in New Issue
Block a user