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
+3 -2
View File
@@ -1,5 +1,6 @@
module Dodge.Material.Damage (damMatSideEffect) where
import Linear
import Control.Lens
import Dodge.Data.World
import Dodge.SoundLogic
@@ -45,7 +46,7 @@ damageStone dm ecw w =
where
v = case ecw of
Right wl -> uncurry (-) $ _wlLine wl
Left cr -> vNormal (p - _crPos cr)
Left cr -> vNormal (p - cr ^. crPos . _xy)
randsound p xs =
let (x, g) = runState (takeOne xs) $ _randGen w
in soundStart so p x Nothing . set randGen g
@@ -76,7 +77,7 @@ damageMetal dm ecw w =
where
v = case ecw of
Right wl -> uncurry (-) $ _wlLine wl
Left cr -> vNormal (p - _crPos cr)
Left cr -> vNormal (p - cr ^. crPos . _xy)
outTo x t = x -.- squashNormalizeV t
randsound p xs =
let (x, g) = runState (takeOne xs) $ _randGen w