the finally opened up to failure again.
This commit is contained in:
@@ -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 ))
|
||||
|
||||
Reference in New Issue
Block a user