diff --git a/src/backend/commands/teleport/teleport_to_personal_vehicle.cpp b/src/backend/commands/teleport/teleport_to_personal_vehicle.cpp index bef51e01..cc352134 100644 --- a/src/backend/commands/teleport/teleport_to_personal_vehicle.cpp +++ b/src/backend/commands/teleport/teleport_to_personal_vehicle.cpp @@ -11,11 +11,8 @@ namespace big virtual void execute(const std::vector&, const std::shared_ptr ctx) { - if (g_local_player && g_local_player->m_vehicle) - { - Vehicle veh = mobile::mechanic::get_personal_vehicle(); - teleport::into_vehicle(veh); - } + Vehicle veh = mobile::mechanic::get_personal_vehicle(); + teleport::into_vehicle(veh); } }; diff --git a/src/backend/looped/vehicle/boost_behavior.cpp b/src/backend/looped/vehicle/boost_behavior.cpp index 21c6a69d..3514cdd4 100644 --- a/src/backend/looped/vehicle/boost_behavior.cpp +++ b/src/backend/looped/vehicle/boost_behavior.cpp @@ -1,5 +1,6 @@ #include "backend/looped/looped.hpp" #include "core/enums.hpp" +#include "gta/enums.hpp" #include "natives.hpp" namespace big @@ -20,6 +21,18 @@ namespace big vehicle->m_boost_allow_recharge = true; vehicle->m_boost = 3.f; } + else if (g.vehicle.boost_behavior == eBoostBehaviors::HOLD_FOR_INFINITE) + { + if (vehicle->m_boost_state && PAD::IS_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_VEH_ROCKET_BOOST)) + { + vehicle->m_boost_allow_recharge = true; + vehicle->m_boost = 3.f; + } + else if (vehicle->m_boost_state) + { + vehicle->m_boost_state = false; + } + } } } } diff --git a/src/backend/looped/weapons/weapon_hotkeys.cpp b/src/backend/looped/weapons/weapon_hotkeys.cpp index 7b1ab0b5..3a6a62d2 100644 --- a/src/backend/looped/weapons/weapon_hotkeys.cpp +++ b/src/backend/looped/weapons/weapon_hotkeys.cpp @@ -6,7 +6,7 @@ namespace big { - const int input_array[6] = {(int)ControllerInputs::INPUT_SELECT_WEAPON_UNARMED, (int)ControllerInputs::INPUT_SELECT_WEAPON_MELEE, (int)ControllerInputs::INPUT_SELECT_WEAPON_HANDGUN, (int)ControllerInputs::INPUT_SELECT_WEAPON_SHOTGUN, (int)ControllerInputs::INPUT_SELECT_WEAPON_SMG, (int)ControllerInputs::INPUT_SELECT_WEAPON_AUTO_RIFLE}; + const int input_array[6] = {(int)ControllerInputs::INPUT_SELECT_WEAPON_UNARMED, (int)ControllerInputs::INPUT_SELECT_WEAPON_MELEE, (int)ControllerInputs::INPUT_SELECT_WEAPON_SHOTGUN, (int)ControllerInputs::INPUT_SELECT_WEAPON_HEAVY, (int)ControllerInputs::INPUT_SELECT_WEAPON_SPECIAL, (int)ControllerInputs::INPUT_SELECT_WEAPON_HANDGUN}; static void resolve_weapon_hotkey(Hash weapon) { @@ -34,7 +34,7 @@ namespace big WEAPON::GET_CURRENT_PED_VEHICLE_WEAPON(player_ped, ¤t_vehicle_weapon); for (int iterator_keys = 0; iterator_keys < 6; iterator_keys++) { - PAD::DISABLE_CONTROL_ACTION(0, input_array[iterator_keys], TRUE); + PAD::DISABLE_CONTROL_ACTION(0, input_array[iterator_keys], FALSE); if (PAD::IS_DISABLED_CONTROL_JUST_PRESSED(0, input_array[iterator_keys])) { auto hotkey_vector = g.weapons.weapon_hotkeys[iterator_keys]; diff --git a/src/core/enums.hpp b/src/core/enums.hpp index dc898231..bf6b1401 100644 --- a/src/core/enums.hpp +++ b/src/core/enums.hpp @@ -6,9 +6,10 @@ namespace big { DEFAULT, INSTANT_REFIL, - INFINITE_BOOST + INFINITE_BOOST, + HOLD_FOR_INFINITE }; - NLOHMANN_JSON_SERIALIZE_ENUM(eBoostBehaviors, {{eBoostBehaviors::DEFAULT, "default"}, {eBoostBehaviors::INSTANT_REFIL, "instant"}, {eBoostBehaviors::INFINITE_BOOST, "infinite"}}) + NLOHMANN_JSON_SERIALIZE_ENUM(eBoostBehaviors, {{eBoostBehaviors::DEFAULT, "default"}, {eBoostBehaviors::INSTANT_REFIL, "instant"}, {eBoostBehaviors::INFINITE_BOOST, "infinite"}, {eBoostBehaviors::HOLD_FOR_INFINITE, "hold"}}) enum class CustomWeapon { diff --git a/src/core/settings.hpp b/src/core/settings.hpp index 0a0d35e1..8cd3bf40 100644 --- a/src/core/settings.hpp +++ b/src/core/settings.hpp @@ -403,7 +403,9 @@ namespace big int menu_toggle = VK_INSERT; int teleport_waypoint = 0; int teleport_objective = 0; + int teleport_pv = 0; int noclip = 0; + int vehicle_flymode = 0; int bringvehicle = 0; int invis = 0; int heal = 0; @@ -417,13 +419,13 @@ namespace big int localinvisveh = 0; int fill_ammo = 0; int fast_quit = 0; - int cmd_excecutor = 0x55; + int cmd_excecutor = 'U'; int repairpv = 0; int open_vehicle_controller = 0; int clear_wanted = 0; int random_ped_components = 0; - NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, noclip, bringvehicle, invis, heal, fill_inventory, skip_cutscene, freecam, superrun, superjump, beastjump, invisveh, localinvisveh, fill_ammo, fast_quit, cmd_excecutor, repairpv, open_vehicle_controller, clear_wanted, random_ped_components) + NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, teleport_pv, noclip, vehicle_flymode, bringvehicle, invis, heal, fill_inventory, skip_cutscene, freecam, superrun, superjump, beastjump, invisveh, localinvisveh, fill_ammo, fast_quit, cmd_excecutor, repairpv, open_vehicle_controller, clear_wanted, random_ped_components) } hotkeys{}; bool dev_dlc = false; diff --git a/src/services/hotkey/hotkey_service.cpp b/src/services/hotkey/hotkey_service.cpp index cf79ece7..f55d709d 100644 --- a/src/services/hotkey/hotkey_service.cpp +++ b/src/services/hotkey/hotkey_service.cpp @@ -14,9 +14,10 @@ namespace big // ordered alphabetically to more easily see if a certain hotkey is present register_hotkey("beastjump", g.settings.hotkeys.beastjump, RAGE_JOAAT("beastjump")); register_hotkey("bringpv", g.settings.hotkeys.bringvehicle, RAGE_JOAAT("bringpv")); + register_hotkey("clearwantedlvl", g.settings.hotkeys.clear_wanted, RAGE_JOAAT("clearwantedlvl")); register_hotkey("cmdexecutor", g.settings.hotkeys.cmd_excecutor, RAGE_JOAAT("cmdexecutor")); - register_hotkey("fastrun", g.settings.hotkeys.superrun, RAGE_JOAAT("fastrun")); register_hotkey("fastquit", g.settings.hotkeys.fast_quit, RAGE_JOAAT("fastquit")); + register_hotkey("fastrun", g.settings.hotkeys.superrun, RAGE_JOAAT("fastrun")); register_hotkey("fillammo", g.settings.hotkeys.fill_ammo, RAGE_JOAAT("fillammo")); register_hotkey("fillsnacks", g.settings.hotkeys.fill_inventory, RAGE_JOAAT("fillsnacks")); register_hotkey("freecam", g.settings.hotkeys.freecam, RAGE_JOAAT("freecam")); @@ -26,12 +27,13 @@ namespace big register_hotkey("localinvisveh", g.settings.hotkeys.localinvisveh, RAGE_JOAAT("localinvisveh")); register_hotkey("noclip", g.settings.hotkeys.noclip, RAGE_JOAAT("noclip")); register_hotkey("objective", g.settings.hotkeys.teleport_objective, RAGE_JOAAT("objectivetp")); + register_hotkey("pvtp", g.settings.hotkeys.teleport_pv, RAGE_JOAAT("pvtp")); register_hotkey("repairpv", g.settings.hotkeys.repairpv, RAGE_JOAAT("repairpv")); register_hotkey("skipcutscene", g.settings.hotkeys.skip_cutscene, RAGE_JOAAT("skipcutscene")); register_hotkey("superjump", g.settings.hotkeys.superjump, RAGE_JOAAT("superjump")); register_hotkey("vehiclecontroller", g.settings.hotkeys.open_vehicle_controller, RAGE_JOAAT("vehiclecontrol")); + register_hotkey("vehiclefly", g.settings.hotkeys.vehicle_flymode, RAGE_JOAAT("vehiclefly")); register_hotkey("waypoint", g.settings.hotkeys.teleport_waypoint, RAGE_JOAAT("waypointtp")); - register_hotkey("clearwantedlvl", g.settings.hotkeys.clear_wanted, RAGE_JOAAT("clearwantedlvl")); g_renderer->add_wndproc_callback([this](HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { wndproc(static_cast(msg), wparam); diff --git a/src/views/settings/view_hotkey_settings.cpp b/src/views/settings/view_hotkey_settings.cpp index 6c87d6b1..eaaed5ce 100644 --- a/src/views/settings/view_hotkey_settings.cpp +++ b/src/views/settings/view_hotkey_settings.cpp @@ -15,6 +15,8 @@ namespace big g_hotkey_service->update_hotkey("waypoint", g.settings.hotkeys.teleport_waypoint); if (ImGui::Hotkey("Teleport to objective", &g.settings.hotkeys.teleport_objective)) g_hotkey_service->update_hotkey("objective", g.settings.hotkeys.teleport_objective); + if (ImGui::Hotkey("Teleport into PV", &g.settings.hotkeys.teleport_pv)) + g_hotkey_service->update_hotkey("pvtp", g.settings.hotkeys.teleport_pv); if (ImGui::Hotkey("Toggle Noclip", &g.settings.hotkeys.noclip)) g_hotkey_service->update_hotkey("noclip", g.settings.hotkeys.noclip); @@ -50,6 +52,8 @@ namespace big g_hotkey_service->update_hotkey("repairpv", g.settings.hotkeys.repairpv); if (ImGui::Hotkey("Vehicle controller", &g.settings.hotkeys.open_vehicle_controller)) g_hotkey_service->update_hotkey("vehiclecontroller", g.settings.hotkeys.open_vehicle_controller); + if (ImGui::Hotkey("Toggle Vehicle Fly", &g.settings.hotkeys.vehicle_flymode)) + g_hotkey_service->update_hotkey("vehiclefly", g.settings.hotkeys.vehicle_flymode); if (ImGui::Hotkey("Clear Wanted", &g.settings.hotkeys.clear_wanted)) g_hotkey_service->update_hotkey("clearwantedlvl", g.settings.hotkeys.clear_wanted); diff --git a/src/views/vehicle/view_fun_vehicle.cpp b/src/views/vehicle/view_fun_vehicle.cpp index e01e4a79..bb73e694 100644 --- a/src/views/vehicle/view_fun_vehicle.cpp +++ b/src/views/vehicle/view_fun_vehicle.cpp @@ -175,10 +175,10 @@ namespace big } ImGui::Separator(); - const char* boost_behaviors[] = {"DEFAULT"_T.data(), "INSTANT_REFILL"_T.data(), "INFINITE"_T.data()}; + const char* boost_behaviors[] = {"DEFAULT"_T.data(), "INSTANT_REFILL"_T.data(), "INFINITE"_T.data(), "HOLD_FOR_BOOST"_T.data()}; if (ImGui::BeginCombo("BOOST_BEHAVIOR"_T.data(), boost_behaviors[static_cast(g.vehicle.boost_behavior)])) { - for (int i = 0; i < 3; i++) + for (int i = 0; i < 4; i++) { bool itemSelected = g.vehicle.boost_behavior == static_cast(i);