diff options
author | Kahrl <kahrl@gmx.net> | 2011-09-08 16:10:44 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2011-09-08 16:10:44 +0200 |
commit | e4cb0044602f2dc5eb92c8955797b628c158a0d9 (patch) | |
tree | 7a8c131e399a67033b9fc11458bf81d97b02ea6c /src/game.cpp | |
parent | 71418639d3e81a0c4f03633042f9c3472572a87e (diff) | |
download | hax-minetest-server-e4cb0044602f2dc5eb92c8955797b628c158a0d9.tar.gz hax-minetest-server-e4cb0044602f2dc5eb92c8955797b628c158a0d9.zip |
trying something else... also replaced M_PI by PI everywhere
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp index af4886137..cb7594c30 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -831,7 +831,7 @@ void the_game( Tool */ - v3f tool_wield_position(0.06*BS, 1.619*BS, 0.1*BS); + v3f tool_wield_position(0.06*BS, -0.06*BS, 0.1*BS); v3f tool_wield_rotation(-25, 180, -25); float tool_wield_animation = 0.0; scene::IMeshSceneNode *tool_wield; @@ -856,7 +856,7 @@ void the_game( mesh->addMeshBuffer(buf); buf->drop(); - tool_wield = smgr->addMeshSceneNode(mesh, camera.getPlayerNode()); + tool_wield = smgr->addMeshSceneNode(mesh, camera.getCameraNode()); mesh->drop(); } tool_wield->setVisible(false); @@ -1997,8 +1997,9 @@ void the_game( Animate tool */ { - tool_wield->setRotation(tool_wield_rotation - sin(tool_wield_animation * PI) * 40.0); - tool_wield->setPosition(tool_wield_position - sin(tool_wield_animation * PI) / 3.0); + f32 tool_wield_sin = sin(tool_wield_animation * PI); + tool_wield->setRotation(tool_wield_rotation - tool_wield_sin * 40.0); + tool_wield->setPosition(tool_wield_position - tool_wield_sin * BS / 30.0); } |