Add toggle for shadows on clouds

This commit is contained in:
2021-09-03 23:47:22 +01:00
parent fd85093833
commit 1ab3f1773c
6 changed files with 38 additions and 43 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ import Control.Monad.State
bulHitCr :: Particle -> Point2 -> Creature -> World -> World
bulHitCr bt p cr w
| crIsArmouredFrom p cr
= createSparkCol 8 colID p1 (argV (p1 -.- p) + d1) Nothing . addDamageArmoured $ w
= createSparkCol 8 colID p1 (argV (p1 -.- p) + d1) . addDamageArmoured $ w
| otherwise = addDamage . makeHitSound . flashEff $ w
where
sp = head $ _btTrail' bt
@@ -135,7 +135,7 @@ bulConCr' bt p cr w
{- | Hitting wall effects: create a spark, damage blocks. -}
bulHitWall' :: Particle -> Point2 -> Wall -> World -> World
bulHitWall' bt p x w = damageBlocksBy 5 x
$ createSparkCol 8 theCol pOut (reflectDir x) Nothing
$ createSparkCol 8 theCol pOut (reflectDir x)
$ set randGen g
w
where
@@ -202,7 +202,7 @@ hvBulHitWall' bt p x w = damageBlocksBy 5 x $ set randGen g $ foldr ($) w (spar
cs = map (brightX 100 1.5 . numColor) cs'
ds = randomRs (-0.7,0.7) $ _randGen w
ts = randomRs (4,8) $ _randGen w
sparks pos vel = zipWith3 (\t c d -> createSparkCol t c pos (argV vel + d) Nothing) ts cs ds
sparks pos vel = zipWith3 (\t c d -> createSparkCol t c pos (argV vel + d)) ts cs ds
bulHitFF' :: Particle -> Point2 -> ForceField -> World -> World
bulHitFF' _ _ _ = id