summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-11 12:22:37 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-11 12:22:37 +0200
commita87d19cd7ed3a4ca8b320ce573f3a5e1649ed561 (patch)
treeee1f051989cb611674f0ed1bfd26f969380e79c5
parent611fe41588c328191d9298279d33d7398253d609 (diff)
downloadminetest-a87d19cd7ed3a4ca8b320ce573f3a5e1649ed561.tar.gz
minetest-a87d19cd7ed3a4ca8b320ce573f3a5e1649ed561.tar.bz2
minetest-a87d19cd7ed3a4ca8b320ce573f3a5e1649ed561.zip
When mouse button is held down in air, show continuous animation
-rw-r--r--src/game.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 6dbbd43df..c45cf47a3 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1889,7 +1889,6 @@ void the_game(
}
bool left_punch = false;
- bool left_punch_muted = false;
if(playeritem_usable && input->getLeftState())
{
@@ -2109,10 +2108,15 @@ void the_game(
client.interact(3, pointed); // place
}
}
+ else if(input->getLeftState())
+ {
+ // When button is held down in air, show continuous animation
+ left_punch = true;
+ }
pointed_old = pointed;
- if(left_punch || (input->getLeftClicked() && !left_punch_muted))
+ if(left_punch || input->getLeftClicked())
{
camera.setDigging(0); // left click animation
}