Refactor gun smoke

This commit is contained in:
2021-03-24 03:28:42 +01:00
parent 48e6779503
commit 9b83afbdd0
2 changed files with 14 additions and 37 deletions
+4 -4
View File
@@ -414,7 +414,7 @@ hvAutoGun = defaultAutoGun
, _wpFireRate = 25
, _wpFireState = 0
, _wpFire = rateIncAB 24 10 (torqueBeforeForced 0.1 mkHvBul)
$torqueAfter 0.2 mkHvBul
$ torqueAfter 0.2 mkHvBul
, _wpSpread = autogunSpread
, _wpRange = 20
, _itFloorPict = onLayer FlItLayer $ color orange $ polygon $ rectNESW 5 5 (-5) (-5)
@@ -789,7 +789,7 @@ moveShell time i cid rot accel w
$ (normalizeAnglePi (dir - _crDir cr)) / 20
_ -> 0
r1 = _randGen w & evalState (randInCirc 10)
smokeGen = makeSmokeCloud (oldPos +.+ r1 +.+ 30 *.* (normalizeV (oldPos -.- newPos)))
smokeGen = makeSmokeCloudAt (oldPos +.+ r1 +.+ 30 *.* (normalizeV (oldPos -.- newPos)))
normalizeAnglePi angle | normalizeAngle angle > pi = normalizeAngle angle - 2*pi
@@ -951,7 +951,7 @@ moveFlame rotd w pt
(0.2 *.* vel)
scaleChange | time < 80 = 3
| otherwise = 3 - (fromIntegral time - 80) * 0.2
smokeGen = makeFlamerSmoke ep
smokeGen = makeFlamerSmokeAt ep
flamerAngle = 0.3
@@ -1439,7 +1439,7 @@ moveRemoteShell time i cid itid dir w
thingHit = hitCr <|> hitWl
r1 = _randGen w & evalState (randInCirc 10)
smokeGen = makeSmokeCloud (oldPos +.+ r1 +.+ 30 *.* (normalizeV (oldPos -.- newPos)))
smokeGen = makeSmokeCloudAt (oldPos +.+ r1 +.+ 30 *.* (normalizeV (oldPos -.- newPos)))
doExplosion = explodeRemoteRocket itid i cid
setScope w' = case _itemPositions w' IM.! itid of
InInv cid invid