Improve bullet hit detection

This commit is contained in:
2026-04-13 20:26:34 +01:00
parent b8bec2c830
commit 431e64fbfb
8 changed files with 59 additions and 17 deletions
+1 -2
View File
@@ -3,7 +3,6 @@
module Dodge.Creature.Update (updateCreature) where
import Dodge.WorldEvent.ThingsHit
import Dodge.Creature.Radius
import Color
import Control.Monad
import qualified IntMapHelp as IM
@@ -112,7 +111,7 @@ slimeCritUpdate cid w
| otherwise = id
v = (s * r) *^ unitVectorAtAngle (cr ^. crDir)
--r = crRad (cr ^. crType)
r = (cr ^?! crType . slimeRad)
r = cr ^?! crType . slimeRad
p = cr ^?! crType . slimeCompression
(p',f')
| dot p v > 0 && dot p v > dot p (vNormal v) && dot p v > dot p (-vNormal v) = (p, id)