Remove destroyed creatures rather than setting flag
Sill only set flag for avatar
This commit is contained in:
@@ -30,7 +30,7 @@ updateExpBarrel ps cr w = case cr ^. crHP of
|
||||
HP _ ->
|
||||
w
|
||||
& makeExplosionAt (CrIndirectO (cr ^. crID)) ((cr ^. crPos) & _z +~ 20) 0
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ CrDestroyed Gibbed
|
||||
& cWorld . lWorld . creatures . at (_crID cr) .~ Nothing
|
||||
_ -> w
|
||||
where
|
||||
f w' p = makeSpark NormalSpark (p + normalizeV p + cr ^. crPos . _xy) (argV p) w'
|
||||
@@ -43,7 +43,7 @@ updateExpBarrel ps cr w = case cr ^. crHP of
|
||||
updateBarrel :: Creature -> World -> World
|
||||
updateBarrel cr = case cr ^. crHP of
|
||||
HP x | x > 0 -> doDamage (cr ^. crID)
|
||||
HP _ -> cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ CrDestroyed Gibbed
|
||||
HP _ -> cWorld . lWorld . creatures . at (_crID cr) .~ Nothing
|
||||
_ -> id
|
||||
|
||||
damsToExpBarrel :: [Damage] -> Creature -> Creature
|
||||
|
||||
Reference in New Issue
Block a user