fix after lint

This commit is contained in:
nek0 2017-09-21 12:27:17 +02:00
parent 93d76ba784
commit 0def206cea
3 changed files with 7 additions and 7 deletions

View file

@ -100,7 +100,7 @@ load = do
return (V3 x y z)
) [0..2000]
let shipList = zipWith (uncurry $ Ship shipBO (length $ loTriangles lobj))
let shipList = zipWith (Ship shipBO (length $ loTriangles lobj))
poss
(repeat $ Quaternion 1 (V3 0 0 0))
@ -108,7 +108,7 @@ load = do
po <- initPhysicsObjects poss
mapM_ (addRigidBody (pWorld phys)) . bodyRigidBody) (poBalls po)
mapM_ (addRigidBody (pWorld phys) . bodyRigidBody) (poBalls po)
addRigidBody (pWorld phys) (bodyRigidBody $ poGround po)
return StateData

View file

@ -54,8 +54,8 @@ update dt = do
liftIO $ stepSimulation (pWorld phys) dt 10 Nothing
posrots <- mapM ((\ball -> do
ms <- liftIO $ getMotionState ball
npos <- liftIO $ fmap (fmap realToFrac) =<< getPosition ms
nrot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms
npos <- liftIO $ return . fmap realToFrac =<< getPosition ms
nrot <- liftIO $ return . fmap realToFrac =<< getRotation ms
return (npos, nrot))
. bodyRigidBody) (poBalls physos)
let nships = map (\(ship, (pos, rot)) ->

View file

@ -54,8 +54,8 @@ update dt = do
liftIO $ stepSimulation (pWorld phys) dt 10 Nothing
(pos, rot) <- do
ms <- liftIO $ getMotionState (bodyRigidBody $ poBall physos)
npos <- liftIO $ fmap (fmap realToFrac) =<< getPosition ms
nrot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms
npos <- liftIO $ return . fmap realToFrac =<< getPosition ms
nrot <- liftIO $ return . fmap realToFrac =<< getRotation ms
return (npos, nrot)
let nship =
(ship sd)
@ -161,7 +161,7 @@ handleKey code
sd <- getAffection
let body = bodyRigidBody $ poBall $ physicsObjects sd
ms <- liftIO $ getMotionState body
rot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms
rot <- liftIO $ return . fmap realToFrac =<< getRotation ms
let tor = 5
torqueimp = case code of
SDL.KeycodeW -> rotate rot (V3 (-tor) 0 0) -- (-dphi)