Commit before attempting to add concurrency to loop

This commit is contained in:
2022-08-16 08:00:47 +01:00
parent 9e3097d681
commit 919a179283
12 changed files with 129 additions and 138 deletions
+4 -4
View File
@@ -33,8 +33,8 @@ updateProjectile pj = case pj of
shellCollisionCheck :: (Proj -> World -> World) -> Proj -> World -> World
shellCollisionCheck doExplode pj w
| time > 340 && circOnSomeWall oldPos 4 w = doExplode pj w
| time <= 340 && anythingHitCirc 2 oldPos newPos w = doExplode pj w
| time > 330 && circOnSomeWall oldPos 4 w = doExplode pj w
| time <= 330 && anythingHitCirc 2 oldPos newPos w = doExplode pj w
| time <= 0 = doExplode pj w
| otherwise = w
where
@@ -48,8 +48,8 @@ remoteShellCollisionCheck = shellCollisionCheck $ \pj -> explodeRemoteRocket (fr
plainShellCollisionCheck :: Proj -> World -> World
plainShellCollisionCheck = shellCollisionCheck $ \pj ->
(usePayload (_prjPayload pj) (_prjPos pj))
. (stopSoundFrom (ShellSound (_prjID pj)))
usePayload (_prjPayload pj) (_prjPos pj)
. stopSoundFrom (ShellSound (_prjID pj))
. (cWorld . projectiles %~ IM.delete (_prjID pj))
upsProjectile :: Proj -> World -> World