Fix shockwave damage radius for walls

This commit is contained in:
2025-10-28 08:09:44 +00:00
parent 20042fcf8d
commit d6c4d3d609
16 changed files with 137 additions and 314 deletions
+3 -6
View File
@@ -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