diff --git a/C++ProjectTemplate b/C++ProjectTemplate index d43b418..5b3c7a5 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index a90d968..84492d3 100644 --- a/main.cpp +++ b/main.cpp @@ -68,8 +68,16 @@ void Meteos::updateGame(float fElapsedTime){ if (c2.getBlockPosition(b2).y>c.getBlockPosition(b3).y) { c.y-=12-(c2.getBlockPosition(b2).y-c.getBlockPosition(b3).y); + if (fmod(c2.y-c.y,12)!=0){ + std::cout<<"Difference is not equal to 12!! Value:"<0) { c.vspeed/=4; } @@ -440,7 +459,7 @@ void Meteos::updateGame(float fElapsedTime){ if (info.c!=-1){ Block&b=gameBoard.getBlockClumps()[info.c].getBlocks()[info.ind]; for (Block&b2:gameBoard.getBlockClumps()[info.c].getBlocks()){ - if (!b2.markedForRemoval&&gameBoard.getBlockClumps()[info.c].getBlockPosition(b2).y<=gameBoard.getBlockClumps()[info.c].getBlockPosition(b).y){ + if (!b2.markedForRemoval&&b.pos.x==b2.pos.x&&gameBoard.getBlockClumps()[info.c].getBlockPosition(b2).y<=gameBoard.getBlockClumps()[info.c].getBlockPosition(b).y){ c.addBlock(b.pos.x/12,(gameBoard.getBlockClumps()[info.c].getBlockPosition(b2).y-baseBlockPos)/12,b2.col); b2.markedForRemoval=true; } @@ -478,11 +497,11 @@ void Meteos::updateGame(float fElapsedTime){ for (int i=0;i