Decrease muzzle flare light time
This commit is contained in:
+25
-19
@@ -62,6 +62,7 @@ pistol = Weapon
|
||||
, _wpFireState = 0
|
||||
, _wpFire = shootWithSound 0
|
||||
. withRandomDir 0.1
|
||||
. withMuzFlare
|
||||
. withVelWthHiteff (30,0) 2
|
||||
$ threeEff' bulHitCr' bulHitWall' bulHitFF'
|
||||
, _wpSpread = 0.02
|
||||
@@ -124,17 +125,19 @@ autoGun = defaultGun
|
||||
, _itInvDisplay = displayAutoGun
|
||||
}
|
||||
autoFireMode = shootWithSound (fromIntegral autoGunSound)
|
||||
$ withRecoil 40
|
||||
$ torqueBefore 0.05
|
||||
$ withRandomDir (autogunSpread/2)
|
||||
$ withVelWthHiteff (50,0) 3
|
||||
$ threeEff' bulHitCr' bulHitWall' bulHitFF'
|
||||
. withRecoil 40
|
||||
. torqueBefore 0.05
|
||||
. withRandomDir (autogunSpread/2)
|
||||
. withMuzFlare
|
||||
. withVelWthHiteff (50,0) 3
|
||||
$ threeEff' bulHitCr' bulHitWall' bulHitFF'
|
||||
singleFireMode = shootWithSound (fromIntegral autoGunSound)
|
||||
$ withRecoil 40
|
||||
$ torqueAfter 0.03
|
||||
$ withRandomDir (autogunSpread/2)
|
||||
$ withVelWthHiteff (50,0) 3
|
||||
$ threeEff' bulHitCr' bulHitWall' bulHitFF'
|
||||
. withRecoil 40
|
||||
. torqueAfter 0.03
|
||||
. withRandomDir (autogunSpread/2)
|
||||
. withMuzFlare
|
||||
. withVelWthHiteff (50,0) 3
|
||||
$ threeEff' bulHitCr' bulHitWall' bulHitFF'
|
||||
|
||||
incMode :: Int -> World -> World
|
||||
incMode _ w
|
||||
@@ -422,9 +425,10 @@ hvAutoGun = defaultAutoGun
|
||||
, _itEquipPict = drawWeapon $ color orange $ polygon $ rectNESW 5 5 (-5) (-5)
|
||||
}
|
||||
where mkHvBul = withSound (fromIntegral longGunSound)
|
||||
$ withThinSmoke
|
||||
$ withVelWthHiteff (80,0) 6
|
||||
$ threeEff'
|
||||
. withThinSmoke
|
||||
. withMuzFlare
|
||||
. withVelWthHiteff (80,0) 6
|
||||
$ threeEff'
|
||||
hvBulHitCr' hvBulHitWall' bulHitFF'
|
||||
|
||||
ltAutoGun = defaultAutoGun
|
||||
@@ -436,7 +440,8 @@ ltAutoGun = defaultAutoGun
|
||||
, _wpReloadState = 0
|
||||
, _wpFireRate = 4
|
||||
, _wpFireState = 0
|
||||
, _wpFire = shootWithSound 0 . withRandomDir 0.3 $ withVelWthHiteff (30,0) 2 bulletEffect'
|
||||
, _wpFire = shootWithSound 0 . withRandomDir 0.3
|
||||
. withMuzFlare $ withVelWthHiteff (30,0) 2 bulletEffect'
|
||||
, _wpSpread = 0.5
|
||||
, _wpRange = 20
|
||||
, _itFloorPict = onLayer FlItLayer $ color green $ pictures [polygon $ rectNSWE 4 (-4) (-4) 0
|
||||
@@ -463,6 +468,7 @@ miniGun = defaultAutoGun
|
||||
, _wpFire = withWarmUp 50 . torqueBefore 0.03 . withSidePush 50 . withRecoil 15
|
||||
. withRandomDir 0.1
|
||||
. withRandomOffset 9
|
||||
. withMuzFlare
|
||||
$ withVelWthHiteff (30,0) 2 bulletEffect'
|
||||
, _wpSpread = autogunSpread
|
||||
, _wpRange = 20
|
||||
@@ -555,11 +561,11 @@ longGun = defaultGun
|
||||
, _wpFireRate = 100
|
||||
, _wpFireState = 0
|
||||
, _wpFire = shootWithSound (fromIntegral longGunSound)
|
||||
$ withThickSmoke
|
||||
$ torqueAfter 0.05
|
||||
$ withVelWthHiteff (60,0) 6
|
||||
$ threeEff'
|
||||
hvBulHitCr' hvBulHitWall' bulHitFF'
|
||||
. withThickSmoke
|
||||
. torqueAfter 0.05
|
||||
. withMuzFlare
|
||||
. withVelWthHiteff (60,0) 6
|
||||
$ threeEff' hvBulHitCr' hvBulHitWall' bulHitFF'
|
||||
|
||||
, _wpSpread = 0.0
|
||||
, _wpRange = 200
|
||||
|
||||
@@ -94,7 +94,7 @@ shoot f cid w | fireCondition = over (pointerToItem . wpLoadedAmmo) (\ammo -> am
|
||||
reloadCondition = _wpLoadedAmmo item == 0
|
||||
|
||||
withMuzFlare :: (Int -> World -> World) -> Int -> World -> World
|
||||
withMuzFlare f cid w = over tempLightSources (tLightAt 4 pos :)
|
||||
withMuzFlare f cid w = over tempLightSources (tLightAt 3 pos :)
|
||||
. lowLightAt pos2 $ f cid w
|
||||
where cr = _creatures w IM.! cid
|
||||
dir = _crDir cr
|
||||
@@ -112,8 +112,8 @@ withRandomDir acc f cid w = over (creatures . ix cid . crDir) (\d -> d - a)
|
||||
withVelWthHiteff :: Point2 -> Float -> HitEffect' -> Int -> World -> World
|
||||
withVelWthHiteff vel width hiteff cid w
|
||||
= over particles' ((:) newbul)
|
||||
. over tempLightSources ((:) (tLightAt 4 pos))
|
||||
. lowLightAt pos2
|
||||
-- . over tempLightSources ((:) (tLightAt 4 pos))
|
||||
-- . lowLightAt pos2
|
||||
$ set randGen g
|
||||
w
|
||||
where cr = _creatures w IM.! cid
|
||||
|
||||
Reference in New Issue
Block a user