fix bullet owner bug

This commit is contained in:
2021-08-25 17:59:40 +02:00
parent 3440dea0a5
commit 5bb5022ebf
6 changed files with 18 additions and 16 deletions

View File

@@ -2107,7 +2107,7 @@ void Game::checkBulletBalloonCollision()
if (checkCollision(mBalloon[i]->getCollider(), mBullet[j]->getCollider()))
{
// Otorga los puntos correspondientes al globo al jugador que disparó la bala
const int index = mBullet[j]->getOwner();
int index = mBullet[j]->getOwner();
mPlayer[index]->incScoreMultiplier();
mPlayer[index]->addScore(Uint32(mBalloon[i]->getScore() * mPlayer[index]->getScoreMultiplier()));
//setScore(mPlayer[index]->getScore());
@@ -2727,7 +2727,7 @@ void Game::checkGameInput()
}
// Comprueba el input de pausa
if (mInput[0]->checkInput(INPUT_PAUSE, REPEAT_FALSE))
if (mInput[0]->checkInput(INPUT_BUTTON_PAUSE, REPEAT_FALSE))
mSection.name = PROG_SECTION_TITLE;
// Incrementa el contador de la demo
@@ -2811,7 +2811,7 @@ void Game::checkGameInput()
}
// Comprueba el input de pausa
if (mInput[i]->checkInput(INPUT_CANCEL, REPEAT_FALSE))
if (mInput[i]->checkInput(INPUT_BUTTON_PAUSE, REPEAT_FALSE))
{
mSection.subsection = GAME_SECTION_PAUSE;