diff --git a/src/MainGame/MindMap.hs b/src/MainGame/MindMap.hs index aee7637..8aa42e1 100644 --- a/src/MainGame/MindMap.hs +++ b/src/MainGame/MindMap.hs @@ -20,7 +20,7 @@ import Types import MainGame.WorldMap (checkBoundsCollision2, drawTile) -import Util (direction) +import Util updateMind :: Double -> Affection UserData () updateMind dt = do @@ -31,8 +31,9 @@ updateMind dt = do with xyvel with mmvel V2 rx ry <- query xyvel - let dr = (ry / sin (atan (1/2)) / 2) + rx - dc = rx - (ry / sin (atan (1/2)) / 2) + -- let dr = (ry / sin (atan (1/2)) / 2) + rx + -- dc = rx - (ry / sin (atan (1/2)) / 2) + let V2 dr dc = fmap (* 1.5) (V2 rx ry `rotVec` 45) return $ unchanged { mmvel = Set $ 2 * V2 dr dc } diff --git a/src/MainGame/WorldMap.hs b/src/MainGame/WorldMap.hs index ab8f29b..89e44b6 100644 --- a/src/MainGame/WorldMap.hs +++ b/src/MainGame/WorldMap.hs @@ -781,7 +781,8 @@ updateMap dt = do then [(floor dpc :: Int) .. 0] else [0 .. (ceiling dpc :: Int)]) colldpos = dpos * Prelude.foldl - (\acc a -> let ret = checkBoundsCollision2 pos' npos dt acc a + (\acc a -> + let ret = checkBoundsCollision2 pos' npos dt acc a in A.log A.Verbose (show ret) ret) (V2 1 1) (