From 0fb75af68220527fb10ab0ce39e35f61cba67e4c Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 5 Mar 2010 04:38:31 +0100 Subject: Aim with mouse in DefaultPlayer --- HTanks.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'HTanks.hs') diff --git a/HTanks.hs b/HTanks.hs index 1bbae03..c27cb81 100644 --- a/HTanks.hs +++ b/HTanks.hs @@ -164,7 +164,8 @@ simulationStep = do handleEvents :: Main () handleEvents = do - event <- gets driver >>= liftIO . nextEvent + (newgl, event) <- gets driver >>= liftIO . nextEvent + modify $ \state -> state {driver = newgl} when (isJust event) $ do Main.handleEvent $ fromJust event modify $ \state -> state {players = map (\p -> Player.handleEvent p $ fromJust event) $ players state} -- cgit v1.2.3