Work on creature destruction/damage update
This commit is contained in:
+7
-1
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user