diff --git a/C++ProjectTemplate b/C++ProjectTemplate index 51640d1..0353769 100755 Binary files a/C++ProjectTemplate and b/C++ProjectTemplate differ diff --git a/main.cpp b/main.cpp index e24c935..d07600c 100644 --- a/main.cpp +++ b/main.cpp @@ -194,30 +194,32 @@ bool Meteos::OnUserUpdate(float fElapsedTime) matchedBlocksX.push_back(&b); matchedBlocksY.push_back(&b); rightCheckGrounded: - float checkX=targetX+12; + float checkX=1; float checkY=targetY; do{ found=false; - for (Block&b2:gameBoard.getBlocks(i)){ - if (b.pos.x==b2.pos.x&&b.pos.y==b2.pos.y)continue; - if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==checkX&&b2.pos.y==checkY) { - found=true; - checkX+=12; - matchedBlocksX.push_back(&b2); + if (i+checkX=0) { + for (Block&b2:gameBoard.getBlocks(i+checkX)){ + if (b.col==b2.col&&b2.col!=BlockColor::LAUNCHED&&b2.pos.x==b.pos.x+checkX*12&&b2.pos.y==checkY) { + found=true; + checkX--; + matchedBlocksX.push_back(&b2); + } } } }while(found);