Vertical launches resolve properly

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
master
sigonasr2 2 years ago
parent 2505426ebe
commit 876dba04ba
  1. BIN
      C++ProjectTemplate
  2. 5
      main.cpp

Binary file not shown.

@ -337,13 +337,16 @@ bool Meteos::OnUserUpdate(float fElapsedTime)
}
std::cout<<"Launch Block ("<<b.pos<<")"<<b.addedToLaunchList<<std::endl;
b.col=BlockColor::LAUNCHED;
c.vspeed=gameBoard.launchSpd;
}
for (std::pair<int,int>&info:matchedBlockIDs) {
Block&b=gameBoard.getBlocks(info.first)[info.second];
for (Block&b2:gameBoard.getBlocks(b.pos.x/12)) {
if (!b2.markedForRemoval&&b2.pos.y<=b.pos.y) {
c.addBlockOnTopOf(b.pos.x/12,b2.col);
b2.markedForRemoval=true;
}
}
c.vspeed=gameBoard.launchSpd;
}
gameBoard.addClump(c);
}

Loading…
Cancel
Save