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