Improve pulse laser/ball hit detection

This commit is contained in:
2026-03-26 15:07:33 +00:00
parent 40f5d22d88
commit c53e60b956
13 changed files with 193 additions and 185 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ itemBelowAttachables :: CItem -> [ItemSF]
itemBelowAttachables (itm,sf) = case (itm ^. itType, sf) of
(LASER, WeaponTargetingSF) -> getAmmoLinks itm
(LASER, LaserWeaponSF) -> [PulseBallSF] <> getAmmoLinks itm
(LASER, PulseBallSF) -> [PulseBallSF]
-- (LASER, PulseBallSF) -> [PulseBallSF]
--(HELD LASER, _) -> [PulseBallSF]
(HELD LED, _) -> getAmmoLinks itm
(ATTACH CAPACITOR, _) -> [AmmoMagSF 0 ElectricalAmmo]
+1 -1
View File
@@ -65,7 +65,7 @@ refract phasev x y wl p
reflectPulseLaserAlong ::
Float -> Point2 -> Point2 -> World -> ([(Point2, Object)], [Point2])
{-# INLINE reflectPulseLaserAlong #-}
reflectPulseLaserAlong phasev sp ep w = f $ filter (isunshad . snd) $ crWlPbHit sp ep w
reflectPulseLaserAlong phasev sp ep w = f $ filter (isunshad . snd) $ crWlPbHitZ 20 sp ep w
where
f = \case
((p, OWall wl) : _)