generated from sigonasr2/CPlusPlusProjectTemplate
Vertical launches resolve properly
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
2505426ebe
commit
876dba04ba
Binary file not shown.
5
main.cpp
5
main.cpp
@ -337,13 +337,16 @@ bool Meteos::OnUserUpdate(float fElapsedTime)
|
|||||||
}
|
}
|
||||||
std::cout<<"Launch Block ("<<b.pos<<")"<<b.addedToLaunchList<<std::endl;
|
std::cout<<"Launch Block ("<<b.pos<<")"<<b.addedToLaunchList<<std::endl;
|
||||||
b.col=BlockColor::LAUNCHED;
|
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)) {
|
for (Block&b2:gameBoard.getBlocks(b.pos.x/12)) {
|
||||||
if (!b2.markedForRemoval&&b2.pos.y<=b.pos.y) {
|
if (!b2.markedForRemoval&&b2.pos.y<=b.pos.y) {
|
||||||
c.addBlockOnTopOf(b.pos.x/12,b2.col);
|
c.addBlockOnTopOf(b.pos.x/12,b2.col);
|
||||||
b2.markedForRemoval=true;
|
b2.markedForRemoval=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.vspeed=gameBoard.launchSpd;
|
|
||||||
}
|
}
|
||||||
gameBoard.addClump(c);
|
gameBoard.addClump(c);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user