From 433f0d1ea647fdbaa6e4badfe5f399eee2061215 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Wed, 24 Feb 2010 20:07:13 -0800 Subject: [PATCH] game.worlds: construct game-loop object before begin-game-world is called so begin-game-world can change it before the loop is started --- extra/game/worlds/worlds.factor | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extra/game/worlds/worlds.factor b/extra/game/worlds/worlds.factor index dd9b2431c9..bf05eddc71 100644 --- a/extra/game/worlds/worlds.factor +++ b/extra/game/worlds/worlds.factor @@ -44,9 +44,8 @@ PRIVATE> M: game-world begin-world dup use-game-input?>> [ open-game-input ] when dup use-audio-engine?>> [ dup open-game-audio-engine >>audio-engine ] when - dup begin-game-world - dup [ tick-interval-micros>> ] [ ] bi [ >>game-loop ] keep start-loop - drop ; + dup [ tick-interval-micros>> ] [ ] bi + [ >>game-loop begin-game-world ] keep start-loop ; M: game-world end-world [ [ stop-loop ] when* f ] change-game-loop