From 76dceac39148ff1b677b6a7d5250e201732a6bd7 Mon Sep 17 00:00:00 2001 From: Arthur <121949966+ShinyWasabi@users.noreply.github.com> Date: Mon, 19 Feb 2024 00:03:17 +0300 Subject: [PATCH] Remove Random Events and G's Cache (#2716) --- src/core/scr_globals.hpp | 4 -- src/core/settings.hpp | 4 +- src/gta_pointers.hpp | 1 - src/pointers.cpp | 1 - src/util/pools.hpp | 10 ----- src/views/esp/view_esp.cpp | 47 ----------------------- src/views/esp/view_esp.hpp | 2 - src/views/network/view_missions.cpp | 9 ----- src/views/players/player/player_toxic.cpp | 15 +++----- src/views/settings/view_esp_settings.cpp | 5 --- 10 files changed, 6 insertions(+), 92 deletions(-) diff --git a/src/core/scr_globals.hpp b/src/core/scr_globals.hpp index d31b5e82..98d7d017 100644 --- a/src/core/scr_globals.hpp +++ b/src/core/scr_globals.hpp @@ -52,8 +52,6 @@ namespace big::scr_globals static inline const script_global session5(1575007); static inline const script_global session6(2695909); - static inline const script_global gooch(1882037); - static inline const script_global gun_van(1948900); static inline const script_global interaction_menu_access(2710115); // am_pi_menu -> PI_BIK_13_2_H -> global = true; @@ -65,8 +63,6 @@ namespace big::scr_globals static inline const script_global property_garage(1936959); static inline const script_global property_names(1312263); - static inline const script_global pickups(2707706); - static inline const script_global reset_clothing(103936); // freemode 75, &iLocal_.*, 2\); } diff --git a/src/core/settings.hpp b/src/core/settings.hpp index 66a27de2..d77ca096 100644 --- a/src/core/settings.hpp +++ b/src/core/settings.hpp @@ -979,15 +979,13 @@ namespace big bool change_esp_color_from_dist = false; bool scale_health_from_dist = false; bool scale_armor_from_dist = false; - bool object_esp = false; - bool show_gs_cache_boxes = false; float distance_threshold[2] = {100.f, 200.f}; ImU32 enemy_color = 4281479904; ImU32 enemy_near_color = 4283794943; ImU32 default_color = 4285713522; ImU32 friend_color = 4293244509; - NLOHMANN_DEFINE_TYPE_INTRUSIVE(esp, enabled, global_render_distance, tracer_render_distance, box_render_distance, tracer, tracer_draw_position, box, health, armor, god, distance, name, change_esp_color_from_dist, scale_health_from_dist, scale_armor_from_dist, object_esp, show_gs_cache_boxes, distance_threshold, enemy_color, enemy_near_color, default_color, friend_color) + NLOHMANN_DEFINE_TYPE_INTRUSIVE(esp, enabled, global_render_distance, tracer_render_distance, box_render_distance, tracer, tracer_draw_position, box, health, armor, god, distance, name, change_esp_color_from_dist, scale_health_from_dist, scale_armor_from_dist, distance_threshold, enemy_color, enemy_near_color, default_color, friend_color) } esp{}; struct session_browser diff --git a/src/gta_pointers.hpp b/src/gta_pointers.hpp index 37dac3f1..f99c9c49 100644 --- a/src/gta_pointers.hpp +++ b/src/gta_pointers.hpp @@ -288,7 +288,6 @@ namespace big GenericPool** m_ped_pool; GenericPool** m_prop_pool; - GenericPool** m_pickup_pool; VehiclePool*** m_vehicle_pool; PVOID m_netfilter_handle_message; diff --git a/src/pointers.cpp b/src/pointers.cpp index a66b0d29..403e5528 100644 --- a/src/pointers.cpp +++ b/src/pointers.cpp @@ -1237,7 +1237,6 @@ namespace big [](memory::handle ptr) { g_pointers->m_gta.m_prop_pool = ptr.add(3).rip().as(); - g_pointers->m_gta.m_pickup_pool = ptr.add(0xE).rip().as(); } }, // Vehicle Pool diff --git a/src/util/pools.hpp b/src/util/pools.hpp index d1283994..ad30fe2f 100644 --- a/src/util/pools.hpp +++ b/src/util/pools.hpp @@ -18,11 +18,6 @@ namespace big::pools return **g_pointers->m_gta.m_prop_pool; } - inline auto& get_all_pickups() - { - return **g_pointers->m_gta.m_pickup_pool; - } - inline auto get_all_peds_array() { return get_all_peds().to_array(); @@ -37,9 +32,4 @@ namespace big::pools { return get_all_props().to_array(); } - - inline auto get_all_pickups_array() - { - return get_all_pickups().to_array(); - } }; \ No newline at end of file diff --git a/src/views/esp/view_esp.cpp b/src/views/esp/view_esp.cpp index 15ea54fd..22cc6af8 100644 --- a/src/views/esp/view_esp.cpp +++ b/src/views/esp/view_esp.cpp @@ -6,7 +6,6 @@ #include "util/math.hpp" #include "util/misc.hpp" #include "gta/enums.hpp" -#include "core/scr_globals.hpp" namespace big { @@ -173,40 +172,6 @@ namespace big } } - void esp::draw_object(const rage::CDynamicEntity* object, ImDrawList* const draw_list, std::string name) - { - if (!object || !object->m_navigation) - return; - - auto& object_pos = *object->m_navigation->get_position(); - - float screen_x, screen_y; - - const float distance = math::calculate_distance_from_game_cam(object_pos); - const float multplr = distance > g.esp.global_render_distance[1] ? -1.f : 6.17757f / distance; - - if (multplr == -1.f || g.esp.global_render_distance[0] > distance) - return; - - ImVec2 name_pos; - - if (g_pointers->m_gta.m_get_screen_coords_for_world_coords(object_pos.data, &screen_x, &screen_y)) - { - const auto esp_x = (float)*g_pointers->m_gta.m_resolution_x * screen_x; - const auto esp_y = (float)*g_pointers->m_gta.m_resolution_y * screen_y; - name_pos = {esp_x, esp_y}; - } - else - { - return; - } - - ImU32 esp_color = g.esp.default_color; - - draw_list->AddText(name_pos, esp_color, name.c_str()); - } - - void esp::draw() { if (!g.esp.enabled) @@ -217,18 +182,6 @@ namespace big g_player_service->iterate([draw_list](const player_entry& entry) { draw_player(entry.second, draw_list); }); - - if (g.esp.object_esp) - { - if (g.esp.show_gs_cache_boxes && *g_pointers->m_gta.m_script_globals && **g_pointers->m_gta.m_script_globals) - { - auto gs_cache_box_entity = *scr_globals::pickups.at(605).as(); - if (gs_cache_box_entity != 0) - { - draw_object(g_pointers->m_gta.m_handle_to_ptr(gs_cache_box_entity), draw_list, "G's Cache"); - } - } - } } } } \ No newline at end of file diff --git a/src/views/esp/view_esp.hpp b/src/views/esp/view_esp.hpp index f9f23ad1..1111d191 100644 --- a/src/views/esp/view_esp.hpp +++ b/src/views/esp/view_esp.hpp @@ -1,6 +1,5 @@ #pragma once #include "services/players/player_service.hpp" -#include "entities/CDynamicEntity.hpp" namespace big { @@ -9,6 +8,5 @@ namespace big public: static void draw(); static void draw_player(const player_ptr& plyr, ImDrawList* const draw_list); - static void draw_object(const rage::CDynamicEntity* object, ImDrawList* const draw_list, std::string name); }; } \ No newline at end of file diff --git a/src/views/network/view_missions.cpp b/src/views/network/view_missions.cpp index 8c3acb5b..f17ffab6 100644 --- a/src/views/network/view_missions.cpp +++ b/src/views/network/view_missions.cpp @@ -110,15 +110,6 @@ namespace big }); ImGui::EndGroup(); - ImGui::BeginGroup(); - components::button("VIEW_NET_MISSIONS_GHOST_HUNT"_T, [] { - scripts::start_launcher_script(174); - }); - components::button("VIEW_NET_MISSIONS_POSESSED_ANIMALS"_T, [] { - scripts::start_launcher_script(179); - }); - ImGui::EndGroup(); - ImGui::Separator(); if (check_script(RAGE_JOAAT("am_criminal_damage"))) diff --git a/src/views/players/player/player_toxic.cpp b/src/views/players/player/player_toxic.cpp index 127c5c3d..0b70fb7c 100644 --- a/src/views/players/player/player_toxic.cpp +++ b/src/views/players/player/player_toxic.cpp @@ -19,21 +19,16 @@ namespace big components::player_command_button<"ceokick">(g_player_service->get_selected(), {}); ImGui::SameLine(); - components::button("VIEW_PLAYER_TOXIC_GOOCH_TEST"_T, [] { - *scr_globals::gooch.at(289).at(1).as() = g_player_service->get_selected()->id(); - scripts::start_launcher_script(171); - }); - components::player_command_button<"ragdoll">(g_player_service->get_selected(), {}); - ImGui::SameLine(); + components::player_command_button<"beast">(g_player_service->get_selected(), {}); - + ImGui::SameLine(); components::player_command_button<"mission">(g_player_service->get_selected(), {}); - ImGui::SameLine(); - components::player_command_button<"error">(g_player_service->get_selected(), {}); - components::player_command_button<"ceoraid">(g_player_service->get_selected(), {}); + components::player_command_button<"error">(g_player_service->get_selected(), {}); ImGui::SameLine(); + components::player_command_button<"ceoraid">(g_player_service->get_selected(), {}); + components::button("TRIGGER_MC_RAID"_T, [] { toxic::start_activity(g_player_service->get_selected(), eActivityType::BikerDefend); }); diff --git a/src/views/settings/view_esp_settings.cpp b/src/views/settings/view_esp_settings.cpp index ed6a45f6..fbe23940 100644 --- a/src/views/settings/view_esp_settings.cpp +++ b/src/views/settings/view_esp_settings.cpp @@ -38,11 +38,6 @@ namespace big ImGui::Checkbox("SETTINGS_ESP_PLAYER_GOD_MODE"_T.data(), &g.esp.god); ImGui::Checkbox("SETTINGS_ESP_PLAYER_HEALTH"_T.data(), &g.esp.health); ImGui::Checkbox("SETTINGS_ESP_PLAYER_ARMOR"_T.data(), &g.esp.armor); - ImGui::Checkbox("SETTINGS_ESP_OBJECT_ESP"_T.data(), &g.esp.object_esp); - if (g.esp.object_esp) - { - ImGui::Checkbox("SETTINGS_ESP_OBJECT_ESP_GS_CACHE"_T.data(), &g.esp.show_gs_cache_boxes); - } ImGui::Checkbox("SETTINGS_ESP_COLOR_W_DISTANCE"_T.data(), &g.esp.change_esp_color_from_dist); if (g.esp.health)