2022-06-25 21:17:35 +02:00
|
|
|
#include "backend/looped/looped.hpp"
|
|
|
|
#include "natives.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
|
2022-06-25 21:17:35 +02:00
|
|
|
#include <gta/enums.hpp>
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
static const ControllerInputs attack_controls[] = {
|
|
|
|
ControllerInputs::INPUT_WEAPON_WHEEL_NEXT,
|
|
|
|
ControllerInputs::INPUT_WEAPON_WHEEL_PREV,
|
|
|
|
ControllerInputs::INPUT_ATTACK,
|
|
|
|
ControllerInputs::INPUT_ATTACK2,
|
|
|
|
ControllerInputs::INPUT_VEH_ATTACK,
|
|
|
|
ControllerInputs::INPUT_VEH_ATTACK2,
|
|
|
|
ControllerInputs::INPUT_VEH_PASSENGER_ATTACK,
|
|
|
|
ControllerInputs::INPUT_VEH_FLY_ATTACK,
|
|
|
|
ControllerInputs::INPUT_VEH_FLY_ATTACK2,
|
2022-06-25 21:17:35 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void looped::custom_gun_disable_control_action()
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
bool is_custom_gun_selected = g.weapons.custom_weapon != CustomWeapon::NONE;
|
2022-06-25 21:17:35 +02:00
|
|
|
if (is_custom_gun_selected)
|
|
|
|
{
|
|
|
|
for (const auto& control : attack_controls)
|
|
|
|
PAD::DISABLE_CONTROL_ACTION(0, static_cast<int>(control), true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|