diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-09-11 08:36:00 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-09-11 08:36:00 -0400 |
commit | e08f4cc1c7c46ad24526b43da014006f04891c21 (patch) | |
tree | d3793f9f0582ac2983cef841e75fb73a093e0cf1 | |
parent | adc166466555458f06a6b9ca500374b025c11f21 (diff) |
node: Mark node as booted before running on-boot hook.
This fixes some weird order of operations bugs.
* starling/node.scm (boot): Set booted? to #t before calling on-boot.
-rw-r--r-- | starling/node.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starling/node.scm b/starling/node.scm index efb3c12..101887e 100644 --- a/starling/node.scm +++ b/starling/node.scm @@ -127,8 +127,8 @@ represented as a ratio in the range [0, 1]." (define-method (boot (node <node>)) "Prepare NODE to enter the game world for the first time." - (on-boot node) - (set! (booted? node) #t)) + (set! (booted? node) #t) + (on-boot node)) (define-method (activate (node <node>)) "Mark NODE and all of its children as active." |