HOW MANY TIMES TO I HAVE TO FIX YOU, YOU FUCKER
This commit is contained in:
parent
5efd728e9b
commit
5e86872324
@ -112,16 +112,15 @@ void Game::remCollidingProjectiles(){
|
|||||||
while(tor != torpedos.end()){
|
while(tor != torpedos.end()){
|
||||||
|
|
||||||
// missiles can't be right under torpedos, so that must means they are colliding in Y
|
// missiles can't be right under torpedos, so that must means they are colliding in Y
|
||||||
if(miss->getY() + confData.missilesLength < tor->getY()){
|
if(miss->getY() + confData.missilesLength > tor->getY()){
|
||||||
|
if(areLinesColliding( // now check if they collide in X
|
||||||
}
|
miss->getX(), miss->getX() + confData.missilesWidth,
|
||||||
if(areLinesColliding( // now check if they collide in X
|
tor->getX(), tor->getX() + confData.torpedosWidth)){
|
||||||
miss->getX(), miss->getX() + confData.missilesWidth,
|
missiles.erase(miss);
|
||||||
tor->getX(), tor->getX() + confData.torpedosWidth)){
|
torpedos.erase(tor);
|
||||||
missiles.erase(miss);
|
wasColliding = true;
|
||||||
torpedos.erase(tor);
|
break;
|
||||||
wasColliding = true;
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
++tor;
|
++tor;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user