Continue bullet refactor
This commit is contained in:
+2
-2
@@ -218,7 +218,7 @@ updateFlares = flares %~ mapMaybe updateFlare
|
||||
updateBullets :: World -> World
|
||||
updateBullets w = updateInstantBullets $ set bullets (catMaybes ps) w'
|
||||
where
|
||||
(w',ps) = mapAccumR (\a b -> updateBullet a b) w $ _bullets w
|
||||
(w',ps) = mapAccumR updateBullet w $ _bullets w
|
||||
|
||||
{- Apply internal particle updates, delete 'Nothing's. -}
|
||||
updateParticles :: World -> World
|
||||
@@ -298,7 +298,7 @@ intersectSegSegs' _ _ _ = Nothing
|
||||
updateInstantBullets :: World -> World
|
||||
updateInstantBullets w = case _instantBullets w of
|
||||
[] -> w
|
||||
ps -> let (w',ps') = mapAccumR (\a b -> updateBullet a b) (w {_instantBullets=[]}) ps
|
||||
ps -> let (w',ps') = mapAccumR updateBullet (w {_instantBullets=[]}) ps
|
||||
in updateInstantBullets $ w' & bullets .++~ catMaybes ps'
|
||||
|
||||
updateInstantParticles :: World -> World
|
||||
|
||||
Reference in New Issue
Block a user