Fix explosion damage
This commit is contained in:
@@ -138,7 +138,7 @@ overlapCircWalls :: Point2 -> Float -> StreamOf Wall
|
||||
overlapCircWalls p r = S.mapMaybe dointersect
|
||||
where
|
||||
dointersect wl = f (_wlLine wl) <&> (,wl)
|
||||
f (a,b) = intersectSegSeg p (p -.- r *.* vNormal (normalizeV (a -.- b))) a b
|
||||
f (a,b) = intersectSegSeg p (p +.+ r *.* normalizeV ((0.5 *.* (a +.+ b)) -.- p)) a b
|
||||
|
||||
-- | note that this does not push the circle away from the wall at all
|
||||
collideCircWallsStream :: Point2 -> Point2 -> Float -> StreamOf Wall
|
||||
|
||||
Reference in New Issue
Block a user