the finally opened up to failure again.

This commit is contained in:
Bryce Covert
2015-08-14 21:53:07 -07:00
parent c181b4f7e6
commit 05600f7930
3 changed files with 20 additions and 16 deletions

View File

@@ -81,13 +81,10 @@
(put! (get-in starting-entities# [:actions :script-chan])
(fn [starting-entities#]
(let [~entities (atom starting-entities#)]
(thread (do
(try
~@forms
(finally
(change-script-state ~entities false)
(utils/save @~entities)
)))))))))
(thread (do
~@forms
(change-script-state ~entities false)
(utils/save @~entities))))))))
(defmacro get-unsaved-script [entities & forms]
`(fn [starting-entities#]
@@ -95,10 +92,8 @@
(fn [starting-entities#]
(let [~entities (atom starting-entities#)]
(thread (do
(try
~@forms
(finally
(change-script-state ~entities false))))))))))
~@forms
(change-script-state ~entities false))))))))
(defn bound-to-camera [x length zoom]
(min (- length (* length 0.5 zoom ))