From: paul romanchenko Date: Mon, 27 Sep 2010 04:59:40 +0000 (+0400) Subject: Fixed bug when block can slide over the same one X-Git-Url: http://git.maemo.org/git/?p=vexed;a=commitdiff_plain;h=2ae8b5dcd1692ead98f0b318273b6341f74bdbc8 Fixed bug when block can slide over the same one --- diff --git a/playfield.cpp b/playfield.cpp index 2f4e381..626d4bd 100644 --- a/playfield.cpp +++ b/playfield.cpp @@ -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;