Remove separate wall color, should be handled by material type
This commit is contained in:
@@ -47,7 +47,8 @@ colCrWall w c
|
||||
p2 = c ^. crPos . _xy
|
||||
ls = _wlLine <$> wls
|
||||
ls' = filter (uncurry $ isLHS p1) ls
|
||||
wls = filter (not . _wlWalkable) $ wlsNearRect (p2 +.+ V2 r r) (p2 -.- V2 r r) w
|
||||
wls = filter notff $ wlsNearRect (p2 +.+ V2 r r) (p2 -.- V2 r r) w
|
||||
notff x = x ^. wlMaterial /= ForceField
|
||||
|
||||
-- the amount to push creatures out from walls, extra to their radius
|
||||
wallBuffer :: Float
|
||||
@@ -88,9 +89,10 @@ pushOrCrush wls cr = case mapMaybe (pushOutFromWall (crRad (cr ^. crType)) cpos)
|
||||
crOnWall :: Creature -> World -> Bool
|
||||
crOnWall cr =
|
||||
any (uncurry (circOnSeg p r) . _wlLine)
|
||||
. filter (not . _wlWalkable)
|
||||
. filter notff
|
||||
. wlsNearPoint p
|
||||
where
|
||||
notff x = x ^. wlMaterial /= ForceField
|
||||
p = cr ^. crPos . _xy
|
||||
r = crRad (cr ^. crType)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user