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() void looped::weapons_cage_gun()
{ {
bool bCageGun = g.weapons.custom_weapon == CustomWeapon::CAGE_GUN; if (const bool bCageGun = g.weapons.custom_weapon == CustomWeapon::CAGE_GUN; bCageGun)
if (bCageGun)
{ {
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_AIM)) if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_AIM))
{ {

View File

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

View File

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