From f7dac3e0b606957cec156e1738e29859670b4b59 Mon Sep 17 00:00:00 2001 From: nek0 Date: Wed, 15 Nov 2017 18:28:38 +0100 Subject: [PATCH] deparallelize --- src/Affection/Particle.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Affection/Particle.hs b/src/Affection/Particle.hs index 0518cd3..637709f 100644 --- a/src/Affection/Particle.hs +++ b/src/Affection/Particle.hs @@ -13,7 +13,6 @@ import Affection.Types import Control.Monad import Control.Monad.State (get) -import qualified Control.Monad.Parallel as MP import Data.Maybe @@ -34,7 +33,7 @@ updateParticle -> Affection us [Particle] -- ^ processed 'Particle's updateParticle time func l = - catMaybes <$> MP.mapM (\p -> do + catMaybes <$> mapM (\p -> do now <- elapsedTime <$> get if particleCreation p + particleTimeToLive p < now then do @@ -124,7 +123,7 @@ drawParticleSystem sys draw = if not (null parts) then do liftIO $ G.gegl_node_link (particleStackCont $ head parts) (partSysNode sys) - MP.mapM_ (draw (partSysBuffer sys) (partSysNode sys)) parts + mapM_ (draw (partSysBuffer sys) (partSysNode sys)) parts else do _ <- liftIO $ G.gegl_node_disconnect (partSysNode sys) "input" return ()