Cleanup
This commit is contained in:
@@ -4,7 +4,6 @@ module Dodge.Prop.Moving (
|
|||||||
) where
|
) where
|
||||||
|
|
||||||
import Dodge.Damage
|
import Dodge.Damage
|
||||||
import Dodge.Creature.Radius
|
|
||||||
import Dodge.Base
|
import Dodge.Base
|
||||||
import Dodge.Data.World
|
import Dodge.Data.World
|
||||||
import Geometry
|
import Geometry
|
||||||
@@ -19,16 +18,10 @@ fallSmallBounceDamage pr w =
|
|||||||
p = _prPos pr
|
p = _prPos pr
|
||||||
v = _prVel pr
|
v = _prVel pr
|
||||||
dodamage
|
dodamage
|
||||||
| _prPosZ pr < 25 = damageInCircle (return . const thedam) p 5
|
| _prPosZ pr < 25 = damageInCircle (const [thedam]) p 5
|
||||||
-- cWorld . lWorld . creatures . each %~ dodamage'
|
-- cWorld . lWorld . creatures . each %~ dodamage'
|
||||||
| otherwise = id
|
| otherwise = id
|
||||||
thedam = Crushing (floor . (* 10) . max 0 . subtract 5 . abs $ _prVelZ pr)
|
thedam = Crushing (floor . (* 10) . max 0 . subtract 5 . abs $ _prVelZ pr) v
|
||||||
dodamage' cr
|
|
||||||
| dist (_crPos cr) p < crRad (cr ^. crType) + 5 =
|
|
||||||
cr & crDamage
|
|
||||||
.:~ Crushing (floor . (* 10) . max 0 . subtract 5 . abs $ _prVelZ pr) v
|
|
||||||
--(p -.- v) p (p +.+ v)
|
|
||||||
| otherwise = cr
|
|
||||||
|
|
||||||
fallSmallBounce :: Prop -> World -> World
|
fallSmallBounce :: Prop -> World -> World
|
||||||
fallSmallBounce pr w =
|
fallSmallBounce pr w =
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import Geometry
|
|||||||
import qualified IntMapHelp as IM
|
import qualified IntMapHelp as IM
|
||||||
|
|
||||||
crIXsNearPoint :: Point2 -> World -> IS.IntSet
|
crIXsNearPoint :: Point2 -> World -> IS.IntSet
|
||||||
--crIXsNearPoint p w = zoneExtract (zoneOfPoint crZoneSize p) (w ^. cWorld . lWorld . crZoning)
|
|
||||||
crIXsNearPoint = nearPoint crZoneSize _crZoning
|
crIXsNearPoint = nearPoint crZoneSize _crZoning
|
||||||
|
|
||||||
crsNearPoint :: Point2 -> World -> [Creature]
|
crsNearPoint :: Point2 -> World -> [Creature]
|
||||||
@@ -30,8 +29,6 @@ crsNearSeg sp ep w =
|
|||||||
crixsNearSeg :: Point2 -> Point2 -> World -> IS.IntSet
|
crixsNearSeg :: Point2 -> Point2 -> World -> IS.IntSet
|
||||||
crixsNearSeg = nearSeg crZoneSize _crZoning
|
crixsNearSeg = nearSeg crZoneSize _crZoning
|
||||||
|
|
||||||
--crixsNearSeg sp ep w = zonesExtract (w ^. cWorld . lWorld . crZoning) (zoneOfSeg crZoneSize sp ep)
|
|
||||||
|
|
||||||
crIXsNearCirc :: Point2 -> Float -> World -> IS.IntSet
|
crIXsNearCirc :: Point2 -> Float -> World -> IS.IntSet
|
||||||
crIXsNearCirc p r = crsNearRect (p +.+ V2 r r) (p -.- V2 r r)
|
crIXsNearCirc p r = crsNearRect (p +.+ V2 r r) (p -.- V2 r r)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user