afegida la opció de controlar el autofire
This commit is contained in:
@@ -2235,6 +2235,7 @@ void Game::checkInput()
|
||||
int i = 0;
|
||||
for (auto player : players)
|
||||
{
|
||||
const bool autofire = player->isPowerUp() || options->game.autofire;
|
||||
if (player->isAlive() && player->isEnabled())
|
||||
{
|
||||
// Input a la izquierda
|
||||
@@ -2265,7 +2266,7 @@ void Game::checkInput()
|
||||
}
|
||||
}
|
||||
// Comprueba el input de disparar al centro
|
||||
if (input->checkInput(input_fire_center, ALLOW_REPEAT, options->controller[i].deviceType, options->controller[i].index))
|
||||
if (input->checkInput(input_fire_center, autofire, options->controller[i].deviceType, options->controller[i].index))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
@@ -2282,7 +2283,7 @@ void Game::checkInput()
|
||||
}
|
||||
|
||||
// Comprueba el input de disparar a la izquierda
|
||||
else if (input->checkInput(input_fire_left, ALLOW_REPEAT, options->controller[i].deviceType, options->controller[i].index))
|
||||
else if (input->checkInput(input_fire_left, autofire, options->controller[i].deviceType, options->controller[i].index))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
@@ -2299,7 +2300,7 @@ void Game::checkInput()
|
||||
}
|
||||
|
||||
// Comprueba el input de disparar a la derecha
|
||||
else if (input->checkInput(input_fire_right, ALLOW_REPEAT, options->controller[i].deviceType, options->controller[i].index))
|
||||
else if (input->checkInput(input_fire_right, autofire, options->controller[i].deviceType, options->controller[i].index))
|
||||
{
|
||||
if (player->canFire())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user