fixing bugs.
This commit is contained in:
@@ -187,14 +187,15 @@
|
||||
|
||||
(defn start-animation
|
||||
([entity anim]
|
||||
(start-animation {:total-time 0} entity anim))
|
||||
(start-animation {:total-time 0} entity anim))
|
||||
([screen entity anim]
|
||||
(let [new-anim (find-animation entity anim)]
|
||||
(if (and anim (not= new-anim (:anim entity)))
|
||||
(assoc entity
|
||||
:anim new-anim
|
||||
:anim-start (:total-time screen))
|
||||
entity))))
|
||||
(let [new-anim (find-animation entity anim)]
|
||||
(if (and anim (not= new-anim (:anim entity)))
|
||||
(assoc entity
|
||||
:force-rerender true
|
||||
:anim new-anim
|
||||
:anim-start (:total-time screen))
|
||||
entity))))
|
||||
|
||||
(defn stop [screen entities target-id & {:keys [face]}]
|
||||
(update-in entities [:room :entities target-id] (comp #(start-animation screen % (or (:stand-override %) :stand) ) (if face #(assoc % :facing face) identity))))
|
||||
|
||||
Reference in New Issue
Block a user