Allow for bullet drag
This commit is contained in:
@@ -11,7 +11,7 @@ import Control.Lens
|
||||
crIsArmouredFrom :: Point2 -> Creature -> Bool
|
||||
crIsArmouredFrom p cr
|
||||
= p /= _crPos cr
|
||||
&& any (\it -> it ^? itIdentity == Just FrontArmour) (_crInv cr)
|
||||
&& any (\it -> it ^? itCombineType == Just FRONTARMOUR) (_crInv cr)
|
||||
&& angleVV (unitVectorAtAngle $ _crDir cr) (p -.- _crPos cr) < pi/2
|
||||
-- even though angleVV can generate NaN, the comparison seems to deal with it
|
||||
|
||||
|
||||
Reference in New Issue
Block a user