From 3a1d7e990a481f40b38cb717ac30267b27f1ecaa Mon Sep 17 00:00:00 2001 From: nek0 Date: Fri, 30 Dec 2016 14:52:42 +0100 Subject: [PATCH] only shoot one haskelloid at at time --- src/Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index f7c55ce..9518878 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -378,7 +378,8 @@ shotsUpd sec part@Particle{..} = do Just _ -> return $ Just h Nothing -> return Nothing ) (haskelloids ud) - killings <- mapM haskelloidShotDown inters + when (not $ null inters) $ + haskelloidShotDown $ head inters lost <- liftIO $ gegl_rectangle_intersect (GeglRectangle (floor nnx) (floor nny) 4 4) (GeglRectangle @@ -392,7 +393,7 @@ shotsUpd sec part@Particle{..} = do ) lost return part { particlePosition = (nnx, nny) - , particleTimeToLive = if (not $ null killings) then 0 else particleTimeToLive + , particleTimeToLive = if (not $ null inters) then 0 else particleTimeToLive } haskelloidShotDown :: Haskelloid -> Affection UserData ()