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()){
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user