Remove separate wall color, should be handled by material type
This commit is contained in:
+7
-2
@@ -107,8 +107,9 @@ updateBulVel bt = bt & buVel .*.*~ _buDrag bt
|
||||
-- tpos <- cr ^? crTargeting . ctPos . _Just
|
||||
-- return $ BezierTrajectory sp tpos (mouseWorldPos (w ^. input) (w ^. wCam))
|
||||
|
||||
-- might want to restrict what/how bounces by material type
|
||||
bounceDir :: IM.IntMap Item -> (Point2, Either Creature Wall) -> Maybe Point2
|
||||
bounceDir _ (_, Right wl) | _wlBouncy wl = Just $ uncurry (-) (_wlLine wl)
|
||||
bounceDir _ (_, Right wl) = Just $ uncurry (-) (_wlLine wl)
|
||||
bounceDir m (p, Left cr) | crIsArmouredFrom m p cr
|
||||
= Just $ vNormal $ p - (cr ^. crPos . _xy)
|
||||
bounceDir _ _ = Nothing
|
||||
@@ -207,6 +208,10 @@ movePenBullet bu hitstream w = case hitstream of
|
||||
first (damageThingHit bu (p, crwl)) $ movePenBullet bu strm w
|
||||
_ -> expireAndDamage bu hitstream w
|
||||
|
||||
materialPenetrable :: Material -> Bool
|
||||
materialPenetrable _ = error "Haven't decided which materials are peneterable"
|
||||
|
||||
penThing :: Either Creature Wall -> Bool
|
||||
penThing (Left _) = True
|
||||
penThing (Right wl) = _wlPenetrable wl
|
||||
penThing (Right wl) = _wlStructure wl /= StandaloneWall
|
||||
&& materialPenetrable (wl ^. wlMaterial)
|
||||
|
||||
Reference in New Issue
Block a user