Remove instantBullets

This commit is contained in:
2024-12-24 12:50:00 +00:00
parent a28ec07ffb
commit 75958c1e2c
9 changed files with 25 additions and 23 deletions
+8 -7
View File
@@ -543,7 +543,8 @@ updateRadarBlips = updateObjMapMaybe radarBlips updateRadarBlip
{- Apply internal particle updates, delete 'Nothing's. -}
updateBullets :: World -> World
updateBullets w = updateInstantBullets $ set (cWorld . lWorld . bullets) (catMaybes ps) w'
--updateBullets w = updateInstantBullets $ set (cWorld . lWorld . bullets) (catMaybes ps) w'
updateBullets w = set (cWorld . lWorld . bullets) (catMaybes ps) w'
where
(w', ps) = mapAccumR updateBullet w $ w ^. cWorld . lWorld . bullets
@@ -648,12 +649,12 @@ updateClouds = updateObjCatMaybes clouds updateCloud
-- Just
-- (intersectSegSegss x y ass)
--intersectSegsSegss _ _ = Nothing
updateInstantBullets :: World -> World
updateInstantBullets w = case w ^. cWorld . lWorld . instantBullets of
[] -> w
ps ->
let (w', ps') = mapAccumR updateBullet (w & cWorld . lWorld . instantBullets .~ []) ps
in updateInstantBullets $ w' & cWorld . lWorld . bullets .++~ catMaybes ps'
--updateInstantBullets :: World -> World
--updateInstantBullets w = case w ^. cWorld . lWorld . instantBullets of
-- [] -> w
-- ps ->
-- let (w', ps') = mapAccumR updateBullet (w & cWorld . lWorld . instantBullets .~ []) ps
-- in updateInstantBullets $ w' & cWorld . lWorld . bullets .++~ catMaybes ps'
--updateInstantParticles :: World -> World
--updateInstantParticles w = case _instantParticles w of