Make projectile use 3d position/velocity records

This commit is contained in:
2025-08-04 12:15:42 +01:00
parent 80d6133fd6
commit 7714e2e298
7 changed files with 80 additions and 84 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ module Dodge.Update.Camera (
updateCamera,
) where
import Linear.V3
import Dodge.Creature.Radius
import Bound
import Control.Monad
@@ -96,7 +97,7 @@ moveZoomCamera cfig theinput cr w campos =
i <- cr ^? crManipulation . manObject . imSelectedItem
j <- cr ^? crInv . ix i . itUse . uaParams . apProjectiles . ix 0
guard $ Just REMOTESCREEN == cr ^? crInv . ix i . itType . ibtAttach
w ^? cWorld . lWorld . projectiles . ix j . pjPos
w ^? cWorld . lWorld . projectiles . ix j . pjPos . _xy
docamrot = rotateV (campos ^. camRot)
offset = fromMaybe noscopeoffset $ do
guard (SDL.ButtonRight `M.member` _mouseButtons theinput)