Refactor crPos to be a V3
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
module Dodge.Creature.YourControl (yourControl) where
|
||||
|
||||
import Linear
|
||||
import Control.Monad
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import qualified Data.Map.Strict as M
|
||||
@@ -139,7 +140,7 @@ wasdAim inp w cr
|
||||
| Aiming {} <- cr ^. crStance . posture = removeAimPosture cr
|
||||
| otherwise = creatureTurnTowardDir (_crMvAim cr) 0.2 cr
|
||||
where
|
||||
mousedir = argV $ w ^. cWorld . lWorld . lAimPos - (cr ^. crPos)
|
||||
mousedir = argV $ w ^. cWorld . lWorld . lAimPos - (cr ^. crPos . _xy)
|
||||
|
||||
setAimPosture :: IM.IntMap Item -> Creature -> Creature
|
||||
setAimPosture m cr = fromMaybe cr $ do
|
||||
|
||||
Reference in New Issue
Block a user