Zoning/streaming refactor
This commit is contained in:
@@ -96,7 +96,7 @@ moveFlame rotd w pt
|
||||
, _ptCrIgnore = Nothing
|
||||
, _ptVel = speed *.* vel }
|
||||
dodamage = damageInArea closeCrs closeWls pt
|
||||
closeWls wl = uncurry circOnSeg (_wlLine wl) ep 5
|
||||
closeWls wl = uncurry segOnCirc (_wlLine wl) ep 5
|
||||
closeCrs cr = dist ep (_crPos cr)
|
||||
< _crRad cr + 10 - min 9 (max 0 (fromIntegral time - 80))
|
||||
+ 5 * angleCoeff (angleVV (ep -.- _crPos cr) rotd)
|
||||
@@ -197,7 +197,7 @@ damageInRadius :: Float -> Particle -> World -> World
|
||||
damageInRadius size pt = damageInArea isClose closeWls pt
|
||||
where
|
||||
p = _ptPos pt
|
||||
closeWls wl = uncurry circOnSeg (_wlLine wl) p size
|
||||
closeWls wl = uncurry segOnCirc (_wlLine wl) p size
|
||||
isClose cr = dist p (_crPos cr) < _crRad cr + size
|
||||
|
||||
damageInArea :: (Creature -> Bool) -> (Wall -> Bool) -> Particle -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user