Work on creature destruction/damage update

This commit is contained in:
2026-04-16 17:31:53 +01:00
parent 033991ad3f
commit 722a25240e
7 changed files with 102 additions and 88 deletions
+7 -1
View File
@@ -608,7 +608,13 @@ setOldPos cr = cr & crOldPos .~ _crPos cr
zoneCreatures :: World -> World
zoneCreatures w =
w & crZoning .~ foldl' zoneCreature mempty (w ^. cWorld . lWorld . creatures)
w & crZoning .~ foldl' zoneCreature mempty (IM.filter zonableCreature $ w ^. cWorld . lWorld . creatures)
zonableCreature :: Creature -> Bool
zonableCreature cr = case cr ^. crHP of
HP{} -> True
CrIsCorpse{} -> True
CrDestroyed{} -> False
updateCreatureSoundPositions :: World -> World
updateCreatureSoundPositions w =