Add damage origins
This commit is contained in:
+4
-4
@@ -29,7 +29,7 @@ updateFlame w pt
|
||||
reflame wl = pt & flTimer -~ 1 & flVel %~ reflVelWallDamp 0.9 wl
|
||||
doupdate =
|
||||
soundContinue FlameSound sp fireLoudS (Just 2) $
|
||||
damageInCircle (const $ Flaming 1) ep r w
|
||||
damageInCircle (const $ Flaming 1 (pt ^. flOrigin)) ep r w
|
||||
thit = List.safeHead $ thingsHit sp ep w
|
||||
sp = _flPos pt
|
||||
ep = sp + _flVel pt
|
||||
@@ -43,10 +43,10 @@ flFlicker pt
|
||||
.:~ LSParam (addZ 10 $ _flPos pt) 70 (0.5 *.*.* xyzV4 red)
|
||||
| otherwise = id
|
||||
|
||||
makeFlame :: Point2 -> Point2 -> World -> World
|
||||
makeFlame pos vel w =
|
||||
makeFlame :: Point2 -> Point2 -> DamageOrigin -> World -> World
|
||||
makeFlame pos vel d w =
|
||||
w
|
||||
& cWorld . lWorld . flames .:~ Flame t pos vel
|
||||
& cWorld . lWorld . flames .:~ Flame t pos vel d
|
||||
& randGen .~ g
|
||||
where
|
||||
(t, g) = randomR (99, 102) (_randGen w)
|
||||
|
||||
Reference in New Issue
Block a user