HOW MANY TIMES TO I HAVE TO FIX YOU, YOU FUCKER

This commit is contained in:
Thomas R 2022-01-13 10:52:02 +01:00
parent 5efd728e9b
commit 5e86872324
No known key found for this signature in database
GPG Key ID: E538821A6CDFDAD7

View File

@ -112,16 +112,15 @@ void Game::remCollidingProjectiles(){
while(tor != torpedos.end()){
// missiles can't be right under torpedos, so that must means they are colliding in Y
if(miss->getY() + confData.missilesLength < tor->getY()){
}
if(areLinesColliding( // now check if they collide in X
miss->getX(), miss->getX() + confData.missilesWidth,
tor->getX(), tor->getX() + confData.torpedosWidth)){
missiles.erase(miss);
torpedos.erase(tor);
wasColliding = true;
break;
if(miss->getY() + confData.missilesLength > tor->getY()){
if(areLinesColliding( // now check if they collide in X
miss->getX(), miss->getX() + confData.missilesWidth,
tor->getX(), tor->getX() + confData.torpedosWidth)){
missiles.erase(miss);
torpedos.erase(tor);
wasColliding = true;
break;
}
}
++tor;
}