Fixed bug when block can slide over the same one master
authorpaul romanchenko <paulaner@gmail.com>
Mon, 27 Sep 2010 04:59:40 +0000 (08:59 +0400)
committerpaul romanchenko <paulaner@gmail.com>
Mon, 27 Sep 2010 04:59:40 +0000 (08:59 +0400)
playfield.cpp

index 2f4e381..626d4bd 100644 (file)
@@ -66,7 +66,10 @@ void PlayField::move(int w, int h, int w_new)
                 moves++;
                 moved=true;
             }//if coordination has changed, inc the moves
-        } while(cont && (w!=w_new) && ((h_below >= PF::FIELD_HEIGHT) || get(w,h_below)!=PF::CELL_EMPTY));
+        } while(cont && // still moving
+                (w!=w_new) && // didn't arrived
+                ((h_below >= PF::FIELD_HEIGHT) || (get(w,h_below)!=PF::CELL_EMPTY && get(w,h_below) != get(w,h)))  // there is something below
+                );
         do
         {
             cont=false;