Cleanup muzzle flare

This commit is contained in:
jgk
2021-03-22 14:36:20 +01:00
parent 506b0c4b8d
commit bc4aeef35e
5 changed files with 30 additions and 49 deletions
+8 -6
View File
@@ -489,8 +489,9 @@ spreadGun = defaultGun
, _wpFireRate = 20
, _wpFireState = 0
, _wpFire = shootWithSound (fromIntegral shotgunSound)
$ withRecoil 100
$ spreadNumVelWthHiteff' spreadGunSpread 9 (30,0) 2 bulletEffect'
. withRecoil 100
. withMuzFlare
$ spreadNumVelWthHiteff spreadGunSpread 9 (30,0) 2 bulletEffect'
, _wpSpread = spreadGunSpread
, _wpRange = 20
, _itFloorPict = onLayer FlItLayer $ color green $ pictures [ polygon [(-3,0),(3,6),(3,-6)]
@@ -531,8 +532,9 @@ multGun = defaultGun
, _wpFireRate = 20
, _wpFireState = 0
, _wpFire = shootWithSound (fromIntegral shotgunSound)
$ withRecoil 200
$ numVelWthHitEff' 5 (50,0) 4 bulletEffect'
. withRecoil 200
. withMuzFlare
$ numVelWthHitEff 5 (50,0) 4 bulletEffect'
, _wpSpread = spreadGunSpread
, _wpRange = 20
, _itFloorPict = onLayer FlItLayer $ multGunPic
@@ -905,13 +907,13 @@ moveFlame rotd w pt =
-- ((p,(E3x1 cr)):_) -> (damcr cr p $ smokeGen damcrs, Nothing)
((p,(E3x1 cr)):_)
-> (soundFrom Flame fireSound 2 500
$ over worldEvents ((.) $ lowLightRadAt orange 0.05 8 50 ep)
$ over worldEvents ((.) $ flameGlareAt ep)
damcrs
, mvPt')
(thing@(p,(E3x2 wl)):_) -> (fst $ hiteff [thing] damcrs, rfl wl p)
_ -> (soundFrom Flame fireSound 2 500
-- adding reflective glare is too intensive for this laptop
$ over worldEvents ((.) $ lowLightRadAt orange 0.05 8 50 ep)
$ over worldEvents ((.) $ flameGlareAt ep)
damcrs
, mvPt)
where sp = _btPos' pt