Refactor crPos to be a V3

This commit is contained in:
2025-10-10 13:47:31 +01:00
parent 98ece551c7
commit 49fb982877
58 changed files with 375 additions and 307 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ module Dodge.WorldEvent.ThingsHit (
crWlPbHit,
) where
import Linear
import Dodge.Data.Object
import Dodge.Creature.Radius
import Control.Monad
@@ -148,6 +149,6 @@ crsHitRadial :: Point2 -> Float -> World -> [(Point2, Creature)]
crsHitRadial p r = mapMaybe f . crsNearCirc p r
where
f cr = do
let cp = _crPos cr
let cp = cr ^. crPos . _xy
guard $ dist p cp < r + crRad (_crType cr)
return (cp + (1 + crRad (_crType cr)) *.* (cp - p), cr)