When mouse button is held down in air, show continuous animation
authorPerttu Ahola <celeron55@gmail.com>
Sun, 11 Mar 2012 10:22:37 +0000 (12:22 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 11 Mar 2012 10:22:37 +0000 (12:22 +0200)
src/game.cpp

index 6dbbd43dfc9d36ec8a4f2e85d86c343a5f2a9b4d..c45cf47a307e07d125066245133348f2eb72d02b 100644 (file)
@@ -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
                }