aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2011-09-20 11:06:16 +0200
committerKahrl <kahrl@gmx.net>2011-09-20 11:06:16 +0200
commit01f3ae1c5089f36f1f2a164bcaa36fb2fc8642be (patch)
tree402107bf3d236509335767c219ecc85605b64746 /src/game.cpp
parenteaff4616adadf991a2bde66b9e1f1ab693c94c6d (diff)
downloadminetest-01f3ae1c5089f36f1f2a164bcaa36fb2fc8642be.tar.gz
minetest-01f3ae1c5089f36f1f2a164bcaa36fb2fc8642be.tar.bz2
minetest-01f3ae1c5089f36f1f2a164bcaa36fb2fc8642be.zip
Digging animation
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
1 files changed, 7 insertions, 4 deletions
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<<DTIME<<"Left-clicked object"<<std::endl;
client.clickObject(0, selected_object->getBlock()->getPos(),
selected_object->getId(), g_selected_item);
- camera.setDigging(true);
}
else if(input->getRightClicked())
{
@@ -1582,7 +1581,6 @@ void the_game(
std::cout<<DTIME<<"Left-clicked object"<<std::endl;
client.clickActiveObject(0,
selected_active_object->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<<DTIME<<"Left button released (stopped digging)"
<<std::endl;
client.groundAction(2, v3s16(0,0,0), v3s16(0,0,0), 0);
- camera.setDigging(false);
}
if(input->getRightReleased())
{