Don't draw cracks when digging is impossible
authorPerttu Ahola <celeron55@gmail.com>
Sun, 4 Mar 2012 14:21:35 +0000 (16:21 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Sat, 10 Mar 2012 09:28:13 +0000 (11:28 +0200)
src/game.cpp

index 3009112f302519955780e15b4438a39980d99367..594583fdc416f9b37e50e1fff952132e57970f6e 100644 (file)
@@ -1967,8 +1967,12 @@ void the_game(
                                {
                                        dig_index = CRACK_ANIMATION_LENGTH;
                                }
-
-                               if(dig_index < CRACK_ANIMATION_LENGTH)
+                               
+                               // Don't show cracks if not diggable
+                               if(dig_time_complete >= 100000.0)
+                               {
+                               }
+                               else if(dig_index < CRACK_ANIMATION_LENGTH)
                                {
                                        //TimeTaker timer("client.setTempMod");
                                        //infostream<<"dig_index="<<dig_index<<std::endl;