Flash refactor

This commit is contained in:
2021-03-24 20:28:31 +01:00
parent 7c9cba9ee1
commit 7fd49d9b41
3 changed files with 26 additions and 18 deletions
+1 -2
View File
@@ -857,7 +857,7 @@ cloudPoisonDamage c w = w & creatures %~ flip (foldr (IM.adjust doDam)) damagedC
aFlame :: Float -> Int -> World -> World
aFlame a cid w
= shakeCr cid 2
$ soundFrom Flame fireSound 2 500
-- $ soundFrom Flame fireSound 2 500
$ insertFlame $ resetAngle $ set randGen g $
w
where
@@ -867,7 +867,6 @@ aFlame a cid w
dir = _crDir cr + angle
pos = _crPos cr +.+ ((_crRad cr + 2.9) *.* unitVectorAtAngle (_crDir cr))
w1 = set randGen g w
i = newProjectileKey w1
vel = (_crPos cr -.- _crOldPos cr) +.+ 4 *.* unitVectorAtAngle dir
insertFlame = makeFlame pos vel (Just cid) -- . makeFlame pos2 vel (Just cid)
resetAngle = set (creatures . ix cid . crInv . ix (_crInvSel cr) . wpFire)