Allow bullets to spawn bullets
This commit is contained in:
+5
-4
@@ -541,12 +541,13 @@ updateDistortions = updateObjMapMaybe distortions updateDistortion
|
||||
updateRadarBlips :: World -> World
|
||||
updateRadarBlips = updateObjMapMaybe radarBlips updateRadarBlip
|
||||
|
||||
{- Apply internal particle updates, delete 'Nothing's. -}
|
||||
-- if changing, make sure that bullets can still spawn new bullets
|
||||
updateBullets :: World -> World
|
||||
--updateBullets w = updateInstantBullets $ set (cWorld . lWorld . bullets) (catMaybes ps) w'
|
||||
updateBullets w = set (cWorld . lWorld . bullets) (catMaybes ps) w'
|
||||
updateBullets w = w'
|
||||
& cWorld . lWorld . bullets %~ (++ catMaybes ps)
|
||||
where
|
||||
(w', ps) = mapAccumR updateBullet w $ w ^. cWorld . lWorld . bullets
|
||||
(w', ps) = mapAccumR updateBullet (w & cWorld . lWorld . bullets .~ [])
|
||||
$ w ^. cWorld . lWorld . bullets
|
||||
|
||||
updateTeslaArcs :: World -> World
|
||||
updateTeslaArcs = updateObjCatMaybes teslaArcs updateTeslaArc
|
||||
|
||||
Reference in New Issue
Block a user