diff --git a/src/backend/looped/weapons/aimbot.cpp b/src/backend/looped/weapons/aimbot.cpp index 32db26ef..321186d9 100644 --- a/src/backend/looped/weapons/aimbot.cpp +++ b/src/backend/looped/weapons/aimbot.cpp @@ -144,16 +144,19 @@ namespace big const auto ped_handle = g_pointers->m_gta.m_ptr_to_handle(ped); - bool is_enemy = false; + bool is_hated_relationship = false; + bool is_in_combat = PED::IS_PED_IN_COMBAT(ped_handle, self::ped); switch (PED::GET_RELATIONSHIP_BETWEEN_PEDS(ped_handle, self::ped)) { case Dislike: case Wanted: - case Hate: is_enemy = true; + case Hate: is_hated_relationship = true; } - if ((g_aimbot_only_on_enemy.is_enabled() && !is_enemy) || is_a_ped_type_we_dont_care_about(ped_handle)) + if ((g_aimbot_only_on_enemy.is_enabled() && (!is_hated_relationship && !is_in_combat)) || is_a_ped_type_we_dont_care_about(ped_handle)) { + /*if (PED::GET_PED_TYPE(ped_handle) != PED_TYPE_ANIMAL) + LOG(INFO) << " is_hated_relationship " << is_hated_relationship << " GET_PED_TYPE " << PED::GET_PED_TYPE(ped_handle) << " is_in_combat " << is_in_combat;*/ continue; } @@ -273,6 +276,9 @@ namespace big const auto target_velocity = get_velocity(m_target); const auto my_velocity = get_velocity(g_local_player); + if (target_velocity == rage::fvector3{}) + return; + target_position += (target_velocity - my_velocity); } diff --git a/src/core/settings.hpp b/src/core/settings.hpp index 0b544ad7..d4b0b2fc 100644 --- a/src/core/settings.hpp +++ b/src/core/settings.hpp @@ -937,7 +937,7 @@ namespace big bool enable_mk1_variants = false; std::map> weapon_hotkeys{}; - NLOHMANN_DEFINE_TYPE_INTRUSIVE(weapons, ammo_special, custom_weapon, aimbot, infinite_ammo, always_full_ammo, infinite_mag, increased_damage, increase_damage, set_explosion_radius, modify_explosion_radius, no_recoil, no_spread, vehicle_gun_model, increased_c4_limit, increased_flare_limit, rapid_fire, gravity_gun, paintgun, interior_weapon, triggerbot, infinite_range, enable_weapon_hotkeys, weapon_hotkeys, enable_mk1_variants) + NLOHMANN_DEFINE_TYPE_INTRUSIVE(weapons, ammo_special, custom_weapon, aimbot, infinite_ammo, always_full_ammo, infinite_mag, increased_damage, increase_damage, set_explosion_radius, modify_explosion_radius, no_recoil, no_spread, vehicle_gun_model, increased_c4_limit, increased_flare_limit, rapid_fire, gravity_gun, paintgun, interior_weapon, triggerbot, infinite_range, enable_weapon_hotkeys, weapon_hotkeys, enable_mk1_variants, no_sway) } weapons{}; struct window diff --git a/src/gui/handling/current_profile/current_profile_gearing.cpp b/src/gui/handling/current_profile/current_profile_gearing.cpp index 706fbb26..f4b0a921 100644 --- a/src/gui/handling/current_profile/current_profile_gearing.cpp +++ b/src/gui/handling/current_profile/current_profile_gearing.cpp @@ -8,7 +8,7 @@ namespace big { ImGui::Text("HANDLING_INITIAL_DRIVE_GEARS"_T.data()); int initial_drive_gears = g_local_player->m_vehicle->m_handling_data->m_initial_drive_gears; - if (ImGui::DragInt("###handling_drive_gears", &initial_drive_gears, .1f, 1, 16)) + if (ImGui::SliderInt("###handling_drive_gears", &initial_drive_gears, 1, 16)) g_local_player->m_vehicle->m_handling_data->m_initial_drive_gears = initial_drive_gears; ImGui::Text("HANDLING_UPSHIFT_MULTIPLIER"_T.data()); diff --git a/src/views/self/view_outfit_editor.cpp b/src/views/self/view_outfit_editor.cpp index 8a002951..9dd89893 100644 --- a/src/views/self/view_outfit_editor.cpp +++ b/src/views/self/view_outfit_editor.cpp @@ -107,7 +107,7 @@ namespace big ImGui::SetNextItemWidth(120); if (item.drawable_id_max <= 0) ImGui::BeginDisabled(); - if (ImGui::DragInt(std::format("{} [0,{}]##1", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0.25f, 0, item.drawable_id_max)) + if (ImGui::SliderInt(std::format("{} [0,{}]##1", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0, item.drawable_id_max)) { //outfit::check_bounds_drawable(&item); // The game does this on its own, but seems to crash if we call OOB values to fast. (-1 is not a valid scenario) g_fiber_pool->queue_job([item] { @@ -127,7 +127,7 @@ namespace big ImGui::SetNextItemWidth(120); if (item.texture_id_max <= 0) ImGui::BeginDisabled(); - if (ImGui::DragInt(std::format("{} {} [0,{}]##2", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0.1f, 0, item.texture_id_max)) + if (ImGui::SliderInt(std::format("{} {} [0,{}]##2", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0, item.texture_id_max)) { //outfit::check_bounds_drawable(&item); // The game does this on its own, but seems to crash if we call OOB values to fast. (-1 is not a valid scenario) g_fiber_pool->queue_job([item] { @@ -147,7 +147,7 @@ namespace big ImGui::SetNextItemWidth(120); if (item.drawable_id_max <= 0) ImGui::BeginDisabled(); - if (ImGui::DragInt(std::format("{} [0,{}]##3", item.label, item.drawable_id_max).c_str(), &item.drawable_id, 0.25f, -1, item.drawable_id_max)) + if (ImGui::SliderInt(std::format("{} [0,{}]##3", item.label, item.drawable_id_max).c_str(), &item.drawable_id, -1, item.drawable_id_max)) { //outfit::check_bounds_drawable(&item); // The game does this on its own, but seems to crash if we call OOB values to fast. (-1 is only used here as a magic number to signal the removal of the prop.) g_fiber_pool->queue_job([item] { @@ -170,7 +170,7 @@ namespace big ImGui::SetNextItemWidth(120); if (item.texture_id_max <= 0) ImGui::BeginDisabled(); - if (ImGui::DragInt(std::format("{} {} [0,{}]##4", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0.1f, 0, item.texture_id_max)) + if (ImGui::SliderInt(std::format("{} {} [0,{}]##4", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), &item.texture_id, 0, item.texture_id_max)) { //outfit::check_bounds_drawable(&item); // The game does this on its own, but seems to crash if we call OOB values to fast. (-1 is not a valid scenario) g_fiber_pool->queue_job([item] { diff --git a/src/views/self/view_outfit_slots.cpp b/src/views/self/view_outfit_slots.cpp index 1c3a2387..c7db6701 100644 --- a/src/views/self/view_outfit_slots.cpp +++ b/src/views/self/view_outfit_slots.cpp @@ -88,7 +88,7 @@ namespace big for (auto& item : components.items) { ImGui::SetNextItemWidth(120); - ImGui::DragInt(std::format("{} [0,{}]##1", item.label, item.drawable_id_max).c_str(), outfit::get_component_drawable_id_address(slot, item.id), 0.1f, 0, item.drawable_id_max); + ImGui::SliderInt(std::format("{} [0,{}]##1", item.label, item.drawable_id_max).c_str(), outfit::get_component_drawable_id_address(slot, item.id), 0, item.drawable_id_max); } ImGui::EndGroup(); @@ -98,7 +98,7 @@ namespace big for (auto& item : components.items) { ImGui::SetNextItemWidth(120); - ImGui::DragInt(std::format("{} {} [0,{}]##2", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_component_texture_id_address(slot, item.id), 0.1f, 0, item.texture_id_max); + ImGui::SliderInt(std::format("{} {} [0,{}]##2", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_component_texture_id_address(slot, item.id), 0, item.texture_id_max); } ImGui::EndGroup(); @@ -108,7 +108,7 @@ namespace big for (auto& item : props.items) { ImGui::SetNextItemWidth(120); - ImGui::DragInt(std::format("{} [0,{}]##3", item.label, item.drawable_id_max).c_str(), outfit::get_prop_drawable_id_address(slot, item.id), 0.1f, 0, item.drawable_id_max); + ImGui::SliderInt(std::format("{} [0,{}]##3", item.label, item.drawable_id_max).c_str(), outfit::get_prop_drawable_id_address(slot, item.id), 0, item.drawable_id_max); } ImGui::EndGroup(); @@ -118,7 +118,7 @@ namespace big for (auto& item : props.items) { ImGui::SetNextItemWidth(120); - ImGui::DragInt(std::format("{} {} [0,{}]##4", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_prop_texture_id_address(slot, item.id), 0.1f, 0, item.texture_id_max); + ImGui::SliderInt(std::format("{} {} [0,{}]##4", item.label, "OUTFIT_TEX"_T, item.texture_id_max).c_str(), outfit::get_prop_texture_id_address(slot, item.id), 0, item.texture_id_max); } ImGui::EndGroup(); }