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
@@ -1,5 +1,6 @@
module Dodge.Machine where
import Linear
import Dodge.Base
import Dodge.Data.World
import Dodge.Machine.Damage
@@ -51,5 +52,5 @@ machineAddSound sid f mc w
| d < 200 = soundContinueVol (1 -0.005 * d) (MachineSound mid) (_mcPos mc) sid (Just 2) $ f mc w
| otherwise = f mc w
where
d = dist (_crPos $ you w) (_mcPos mc)
d = dist (you w ^. crPos . _xy) (_mcPos mc)
mid = _mcID mc