Fix shockwave damage radius for walls
This commit is contained in:
@@ -17,11 +17,7 @@ import Linear
|
||||
|
||||
-- this needs to be tested with both reflections and refractions
|
||||
reflectLaserAlong ::
|
||||
Float ->
|
||||
Point2 ->
|
||||
Point2 ->
|
||||
World ->
|
||||
(Maybe (Point2, Either Creature Wall), [Point2])
|
||||
Float -> Point2 -> Point2 -> World -> (Maybe (Point2, Either Creature Wall), [Point2])
|
||||
{-# INLINE reflectLaserAlong #-}
|
||||
reflectLaserAlong phasev sp ep w = case thingHitFilt (const True) _wlUnshadowed sp ep w of
|
||||
Just (p, Right wl)
|
||||
@@ -63,7 +59,8 @@ refract phasev x y wl p
|
||||
reflectExternal = 1 < abs (sin angleInc / phasev)
|
||||
|
||||
-- note can hit multiple pulse balls
|
||||
reflectPulseLaserAlong :: Float -> Point2 -> Point2 -> World -> ([(Point2, Object)], [Point2])
|
||||
reflectPulseLaserAlong ::
|
||||
Float -> Point2 -> Point2 -> World -> ([(Point2, Object)], [Point2])
|
||||
{-# INLINE reflectPulseLaserAlong #-}
|
||||
reflectPulseLaserAlong phasev sp ep w = f $ filter (isunshad . snd) $ crWlPbHit sp ep w
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user