Continue tweaking sound
This commit is contained in:
@@ -52,7 +52,7 @@ stateUpdate u cr w = case u (updateMovement cr) w of
|
||||
| otherwise = Nothing
|
||||
deathEff
|
||||
| cr ^.crHP > 0 = id
|
||||
| otherwise = stopSoundFrom (CrWeaponSound (_crID cr))
|
||||
| otherwise = stopSoundFrom (CrWeaponSound (_crID cr) 0)
|
||||
. over decorations addCorpse
|
||||
. dropByState cr
|
||||
addCorpse = IM.insertNewKey
|
||||
@@ -137,11 +137,11 @@ invSideEff cr w = weaponReloadSounds cr $ IM.foldrWithKey f w (_crInv cr)
|
||||
weaponReloadSounds :: Creature -> World -> World
|
||||
weaponReloadSounds cr w = case _crInv cr IM.!? _crInvSel cr of
|
||||
Just Weapon{_wpReloadType = PassiveReload stype,_wpReloadTime=rt,_wpReloadState=rs}
|
||||
| rt == rs -> soundFrom (CrReloadSound 0) (_crPos cr) stype Nothing w
|
||||
| rt == rs -> soundContinue (CrReloadSound 0) (_crPos cr) stype Nothing w
|
||||
| otherwise -> w
|
||||
Just Weapon{_wpReloadState = 0} -> w
|
||||
Just Weapon{_wpReloadState = 1} -> stopSoundFrom (CrReloadSound cid) w
|
||||
Just Weapon{} -> soundFrom (CrReloadSound cid) (_crPos cr) reloadS (Just 1) w
|
||||
Just Weapon{} -> soundContinue (CrReloadSound cid) (_crPos cr) reloadS (Just 1) w
|
||||
_ -> w
|
||||
where
|
||||
cid = _crID cr
|
||||
|
||||
Reference in New Issue
Block a user