From 01f3ae1c5089f36f1f2a164bcaa36fb2fc8642be Mon Sep 17 00:00:00 2001 From: Kahrl Date: Tue, 20 Sep 2011 11:06:16 +0200 Subject: Digging animation --- src/game.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 5e8db9b1d..08bc6f176 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1514,7 +1514,6 @@ void the_game( std::cout<getBlock()->getPos(), selected_object->getId(), g_selected_item); - camera.setDigging(true); } else if(input->getRightClicked()) { @@ -1582,7 +1581,6 @@ void the_game( std::cout<getId(), g_selected_item); - camera.setDigging(true); } else if(input->getRightClicked()) { @@ -1757,7 +1755,7 @@ void the_game( dig_time += dtime; - camera.setDigging(true); + camera.setDigging(0); // left click animation } } @@ -1820,6 +1818,7 @@ void the_game( else { client.groundAction(1, nodepos, neighbourpos, g_selected_item); + camera.setDigging(1); // right click animation } } @@ -1828,6 +1827,11 @@ void the_game( } // selected_object == NULL + if(input->getLeftClicked()) + { + camera.setDigging(0); // left click animation + } + input->resetLeftClicked(); input->resetRightClicked(); @@ -1836,7 +1840,6 @@ void the_game( std::cout<getRightReleased()) { -- cgit v1.2.3