From e4cb0044602f2dc5eb92c8955797b628c158a0d9 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Thu, 8 Sep 2011 16:10:44 +0200 Subject: trying something else... also replaced M_PI by PI everywhere --- src/game.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/game.cpp') 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); } -- cgit v1.2.3