Refactor crPos to be a V3
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
module Dodge.Render.Picture (fixedCoordPictures) where
|
||||
|
||||
import Linear (_xy)
|
||||
import Control.Lens
|
||||
import Data.Maybe
|
||||
import Dodge.Base.Coordinate
|
||||
@@ -116,7 +117,7 @@ mouseCursorType u = case u ^. uvWorld . input . mouseContext of
|
||||
w = u ^. uvWorld
|
||||
selsec = u ^? uvWorld . hud . diSelection . _Just . slSec
|
||||
a = fromMaybe 0 $ do
|
||||
cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos
|
||||
cpos <- w ^? cWorld . lWorld . creatures . ix 0 . crPos . _xy
|
||||
return . toClosestMultiple (pi / 32) $
|
||||
argV (w ^. cWorld . lWorld . lAimPos -.- cpos)
|
||||
- w ^. wCam . camRot
|
||||
@@ -293,6 +294,6 @@ drawAimSweep cr w = fold $ do
|
||||
where
|
||||
cdir = _crDir cr
|
||||
rot = campos ^. camRot
|
||||
p = _crPos cr
|
||||
p = cr ^. crPos . _xy
|
||||
campos = w ^. wCam
|
||||
mwp = w ^. cWorld . lWorld . lAimPos
|
||||
|
||||
Reference in New Issue
Block a user