fix after lint
This commit is contained in:
parent
93d76ba784
commit
0def206cea
3 changed files with 7 additions and 7 deletions
|
@ -100,7 +100,7 @@ load = do
|
||||||
return (V3 x y z)
|
return (V3 x y z)
|
||||||
) [0..2000]
|
) [0..2000]
|
||||||
|
|
||||||
let shipList = zipWith (uncurry $ Ship shipBO (length $ loTriangles lobj))
|
let shipList = zipWith (Ship shipBO (length $ loTriangles lobj))
|
||||||
poss
|
poss
|
||||||
(repeat $ Quaternion 1 (V3 0 0 0))
|
(repeat $ Quaternion 1 (V3 0 0 0))
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ load = do
|
||||||
|
|
||||||
po <- initPhysicsObjects poss
|
po <- initPhysicsObjects poss
|
||||||
|
|
||||||
mapM_ (addRigidBody (pWorld phys)) . bodyRigidBody) (poBalls po)
|
mapM_ (addRigidBody (pWorld phys) . bodyRigidBody) (poBalls po)
|
||||||
addRigidBody (pWorld phys) (bodyRigidBody $ poGround po)
|
addRigidBody (pWorld phys) (bodyRigidBody $ poGround po)
|
||||||
|
|
||||||
return StateData
|
return StateData
|
||||||
|
|
|
@ -54,8 +54,8 @@ update dt = do
|
||||||
liftIO $ stepSimulation (pWorld phys) dt 10 Nothing
|
liftIO $ stepSimulation (pWorld phys) dt 10 Nothing
|
||||||
posrots <- mapM ((\ball -> do
|
posrots <- mapM ((\ball -> do
|
||||||
ms <- liftIO $ getMotionState ball
|
ms <- liftIO $ getMotionState ball
|
||||||
npos <- liftIO $ fmap (fmap realToFrac) =<< getPosition ms
|
npos <- liftIO $ return . fmap realToFrac =<< getPosition ms
|
||||||
nrot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms
|
nrot <- liftIO $ return . fmap realToFrac =<< getRotation ms
|
||||||
return (npos, nrot))
|
return (npos, nrot))
|
||||||
. bodyRigidBody) (poBalls physos)
|
. bodyRigidBody) (poBalls physos)
|
||||||
let nships = map (\(ship, (pos, rot)) ->
|
let nships = map (\(ship, (pos, rot)) ->
|
||||||
|
|
|
@ -54,8 +54,8 @@ update dt = do
|
||||||
liftIO $ stepSimulation (pWorld phys) dt 10 Nothing
|
liftIO $ stepSimulation (pWorld phys) dt 10 Nothing
|
||||||
(pos, rot) <- do
|
(pos, rot) <- do
|
||||||
ms <- liftIO $ getMotionState (bodyRigidBody $ poBall physos)
|
ms <- liftIO $ getMotionState (bodyRigidBody $ poBall physos)
|
||||||
npos <- liftIO $ fmap (fmap realToFrac) =<< getPosition ms
|
npos <- liftIO $ return . fmap realToFrac =<< getPosition ms
|
||||||
nrot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms
|
nrot <- liftIO $ return . fmap realToFrac =<< getRotation ms
|
||||||
return (npos, nrot)
|
return (npos, nrot)
|
||||||
let nship =
|
let nship =
|
||||||
(ship sd)
|
(ship sd)
|
||||||
|
@ -161,7 +161,7 @@ handleKey code
|
||||||
sd <- getAffection
|
sd <- getAffection
|
||||||
let body = bodyRigidBody $ poBall $ physicsObjects sd
|
let body = bodyRigidBody $ poBall $ physicsObjects sd
|
||||||
ms <- liftIO $ getMotionState body
|
ms <- liftIO $ getMotionState body
|
||||||
rot <- liftIO $ fmap (fmap realToFrac) =<< getRotation ms
|
rot <- liftIO $ return . fmap realToFrac =<< getRotation ms
|
||||||
let tor = 5
|
let tor = 5
|
||||||
torqueimp = case code of
|
torqueimp = case code of
|
||||||
SDL.KeycodeW -> rotate rot (V3 (-tor) 0 0) -- (-dphi)
|
SDL.KeycodeW -> rotate rot (V3 (-tor) 0 0) -- (-dphi)
|
||||||
|
|
Loading…
Reference in a new issue