Work on gibs and chasms

This commit is contained in:
2025-08-01 09:39:13 +01:00
parent 7110ddb7a6
commit eeb7c8ac88
22 changed files with 586 additions and 373 deletions
+9
View File
@@ -7,6 +7,7 @@ Description : Simulation update
-}
module Dodge.Update (updateUniverse) where
import Dodge.Prop.Moving
import Dodge.WorldEvent.Explosion
import Dodge.Data.Object
import Color
@@ -278,6 +279,7 @@ functionalUpdate u =
. over uvWorld updateFlames
. over uvWorld updateShockwaves
. over uvWorld updateBullets
. over uvWorld updateDebris
. over uvWorld updateEnergyBalls -- energybs can be created by bullets,
-- so should probably be updated before bullets
. over uvWorld updateRadarBlips
@@ -598,6 +600,13 @@ updateBullets w = w' & cWorld . lWorld . bullets <>~ catMaybes ps
mapAccumR updateBullet (w & cWorld . lWorld . bullets .~ []) $
w ^. cWorld . lWorld . bullets
updateDebris :: World -> World
updateDebris w = w' & cWorld . lWorld . debris <>~ catMaybes xs
where
(w', xs) =
mapAccumR updateDebrisChunk (w & cWorld . lWorld . debris .~ []) $
w ^. cWorld . lWorld . debris
updateTeslaArcs :: World -> World
updateTeslaArcs = updateObjCatMaybes teslaArcs updateTeslaArc