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
+2 -1
View File
@@ -342,6 +342,7 @@ functionalUpdate =
pushYouOutFromWalls :: World -> World
pushYouOutFromWalls w = w & cWorld . lWorld . creatures . ix 0 %~ muzzleWallCheck w
-- rotate creature as well? behaviour on ledges?
muzzleWallCheck :: World -> Creature -> Creature
muzzleWallCheck w cr = fromMaybe cr $ do
invid <- cr ^? crManipulation . manObject . imRootSelectedItem . unNInt
@@ -540,7 +541,7 @@ updatePulseBall pb w
thedam = Lasering 100 ep (pb ^. pzbVel)
sp = pb ^. pzbPos
ep = sp + pb ^. pzbVel
thit = thingHit sp ep w
thit = listToMaybe $ thingsHitZ 20 sp ep w
pbFlicker :: PulseBall -> World -> World
pbFlicker pt =