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 -16
View File
@@ -23,23 +23,10 @@ moveShockwave w sw
tFraction = fromIntegral t / fromIntegral (_swMaxTime sw)
rad = r - (3 / 4) * r * tFraction
doDams
| (p ^. _z >= 0) && (p ^. _z < 25) = damageInCircle (Explosive dam) (p ^. _xy) rad
| (p ^. _z >= 0) && (p ^. _z < 25)
&& t > 5
= damageInCircle (Explosive dam) (p ^. _xy) rad
| otherwise = id
-- doDams w' =
-- over (cWorld . lWorld . creatures) (IM.map damCr) $
-- foldl'
-- (flip $ damageWall (Explosive 1000 p))
-- w'
-- hitBlocks
-- hitBlocks = map snd . overlapCircWalls p rad $ wlsNearCirc p rad w
-- -- this is not expansive enough
-- damCr cr
-- | _crID cr `elem` is || dist (_crPos cr) p >= rad + crRad (cr ^. crType) = cr
-- | otherwise = cr & crDamage .:~ Explosive dam p
--where
-- cpos = _crPos cr
-- v = normalizeV (cpos -.- p)
moveInverseShockwave ::
World ->