Fix bug in creature death drop/destruction ordering
This commit is contained in:
@@ -71,14 +71,14 @@ stateUpdate f =
|
||||
]
|
||||
|
||||
checkDeath :: Creature -> World -> World
|
||||
checkDeath cr
|
||||
| _crHP cr > 0 =
|
||||
cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage .~ []
|
||||
| otherwise =
|
||||
dropByState cr
|
||||
. removecr
|
||||
. stopSoundFrom (CrWeaponSound (_crID cr) 0)
|
||||
. corpseOrGib cr
|
||||
checkDeath cr w
|
||||
| _crHP cr > 0 = w
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage .~ []
|
||||
| otherwise = w
|
||||
& dropByState cr -- the order of
|
||||
& removecr -- these is important
|
||||
& stopSoundFrom (CrWeaponSound (_crID cr) 0)
|
||||
& corpseOrGib cr
|
||||
where
|
||||
removecr
|
||||
| _crID cr == 0 =
|
||||
|
||||
Reference in New Issue
Block a user