custom gun refactor (#1230)

This commit is contained in:
Rxann 2023-04-14 13:02:00 -04:00 committed by GitHub
parent 74c3931209
commit 2bb0557946
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 9 deletions

View File

@ -7,9 +7,7 @@ namespace big
{
void looped::weapons_cage_gun()
{
bool bCageGun = g.weapons.custom_weapon == CustomWeapon::CAGE_GUN;
if (bCageGun)
if (const bool bCageGun = g.weapons.custom_weapon == CustomWeapon::CAGE_GUN; bCageGun)
{
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_AIM))
{

View File

@ -8,9 +8,7 @@ namespace big
{
void looped::weapons_delete_gun()
{
bool bCageGun = g.weapons.custom_weapon == CustomWeapon::DELETE_GUN;
if (bCageGun)
if (const bool bDeleteGun = g.weapons.custom_weapon == CustomWeapon::DELETE_GUN; bDeleteGun)
{
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_AIM))
{

View File

@ -8,9 +8,7 @@ namespace big
{
void looped::weapons_repair_gun()
{
bool bRepairGun = g.weapons.custom_weapon == CustomWeapon::REPAIR_GUN;
if (bRepairGun)
if (const bool bRepairGun = g.weapons.custom_weapon == CustomWeapon::REPAIR_GUN; bRepairGun)
{
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_AIM))
{