Tweak sound positions
This commit is contained in:
@@ -879,8 +879,7 @@ tractorBeamAt colID i pos dir = Projectile
|
||||
|
||||
aGasCloud :: Int -> World -> World
|
||||
aGasCloud cid w
|
||||
= -- soundFrom Flame fireSound 2 500
|
||||
insertCloud $ set randGen g $
|
||||
= insertCloud $ set randGen g $
|
||||
w
|
||||
where
|
||||
(a,g) = randomR (-0.1,0.1) (_randGen w)
|
||||
@@ -896,7 +895,6 @@ aGasCloud cid w
|
||||
aFlame :: Float -> Int -> World -> World
|
||||
aFlame a cid w
|
||||
= shakeCr cid 2
|
||||
-- $ soundFrom Flame fireSound 2 500
|
||||
$ insertFlame $ resetAngle $ set randGen g $
|
||||
w
|
||||
where
|
||||
@@ -1381,7 +1379,7 @@ moveRemoteShell time i cid itid dir w
|
||||
$ set (projectiles . ix i . pjUpdate)
|
||||
(moveRemoteShell (time-1) i cid itid newdir)
|
||||
$ over (projectiles . ix i . pjVel) (\v -> accel +.+ frict *.* v)
|
||||
$ soundFrom (ShellSound i) (fromIntegral smokeTrailSound) (1) 250
|
||||
$ soundFromPos (ShellSound i) newPos (fromIntegral smokeTrailSound) (1) 250
|
||||
$ smokeGen
|
||||
$ makeFlameletTimed oldPos
|
||||
(0.5 *.* rotateV (pi+sparkD) accel) Nothing 3 10
|
||||
|
||||
@@ -43,9 +43,9 @@ withWarmUp t f cid w
|
||||
| fState == 0 = set (pointerToItem . wpFire) (withWarmUp 100 f)
|
||||
$ set (pointerToItem . wpFireState) 2
|
||||
w
|
||||
| t > 1 = set (pointerToItem . wpFire) (withWarmUp (t-1) f)
|
||||
| t > 2 = set (pointerToItem . wpFire) (withWarmUp (t-1) f)
|
||||
$ set (pointerToItem . wpFireState) 2
|
||||
$ continueSound 26
|
||||
$ soundFrom (CrWeaponSound cid) 26 2 0
|
||||
w
|
||||
| t > 0 = set (pointerToItem . wpFire) (withWarmUp (t-1) f)
|
||||
$ set (pointerToItem . wpFireState) 2
|
||||
@@ -54,7 +54,7 @@ withWarmUp t f cid w
|
||||
$ over (pointerToItem . wpLoadedAmmo) (\ammo -> ammo-1)
|
||||
$ set (pointerToItem . wpFireState) 2
|
||||
$ f cid
|
||||
$ continueSound 28
|
||||
$ soundFrom (CrWeaponSound cid) 28 2 0
|
||||
w
|
||||
where
|
||||
cr = _creatures w IM.! cid
|
||||
@@ -64,12 +64,8 @@ withWarmUp t f cid w
|
||||
fState = _wpFireState item
|
||||
fRate = _wpFireRate item
|
||||
reloadCondition = _wpLoadedAmmo item == 0
|
||||
continueSound soundID
|
||||
| cid == 0 = soundFrom (CrWeaponSound cid) soundID 1 0
|
||||
| otherwise = soundFromPos (CrWeaponSound cid) (_crPos cr) soundID 1 0
|
||||
|
||||
withSound :: Int -> (Int -> World -> World) -> Int -> World -> World
|
||||
withSound soundid f 0 w = (soundOnce soundid . f 0) w
|
||||
withSound soundid f cid w = (soundOncePos soundid p . f cid) w
|
||||
where
|
||||
p = _crPos (_creatures w IM.! cid)
|
||||
|
||||
Reference in New Issue
Block a user