From 5e0efaaed578fe909a7496738af5410ea7c3176d Mon Sep 17 00:00:00 2001 From: maybegreat48 <96936658+maybegreat48@users.noreply.github.com> Date: Fri, 23 Jun 2023 06:43:44 +0000 Subject: [PATCH] Tunables service fix and theme changes (#1507) --- src/backend/backend.cpp | 4 + .../player/toxic/kick_from_interior.cpp | 113 +- .../looped/system/voice_chat_audio.cpp | 6 +- src/core/data/all_script_names.hpp | 230 +++++ src/core/data/ipls.hpp | 60 +- src/core/globals.hpp | 28 +- src/gta_pointers.hpp | 1 + src/gui.cpp | 51 +- src/gui.hpp | 8 +- src/gui/components/components.hpp | 9 +- .../send_session_matchmaking_attributes.cpp | 8 + src/invoker.cpp | 6 +- src/invoker_asm.asm | 21 - src/main.cpp | 38 +- src/native_hooks/all_scripts.hpp | 4 + src/native_hooks/freemode.hpp | 18 +- src/native_hooks/native_hooks.cpp | 9 +- src/native_hooks/tunables.hpp | 3 - src/pointers.cpp | 1 + src/services/gui/gui_service.hpp | 2 +- .../player_database/persistent_player.hpp | 5 +- .../script_connection/script_connection.cpp | 404 ++++++++ .../script_connection/script_connection.hpp | 75 ++ .../script_connection_service.cpp | 52 + .../script_connection_service.hpp | 20 + src/services/tunables/tunables_service.cpp | 6 +- src/util/scripts.hpp | 10 + src/util/spam.hpp | 37 +- src/util/teleport.hpp | 9 +- src/views/core/view_notifications.cpp | 9 +- src/views/core/view_overlay.cpp | 13 + src/views/debug/view_debug_misc.cpp | 7 +- src/views/debug/view_debug_threads.cpp | 16 + .../{view_session.cpp => view_network.cpp} | 971 +++++++++--------- src/views/network/view_player_database.cpp | 18 +- src/views/network/view_spoofing.cpp | 7 + src/views/players/player/player_kick.cpp | 4 +- src/views/players/player/player_misc.cpp | 1 + src/views/self/view_teleport.cpp | 2 +- src/views/self/view_weapons.cpp | 4 +- src/views/settings/view_gui_settings.cpp | 30 +- src/views/view.hpp | 2 +- src/views/world/view_squad_spawner.cpp | 94 +- 43 files changed, 1616 insertions(+), 800 deletions(-) delete mode 100644 src/invoker_asm.asm create mode 100644 src/services/script_connection/script_connection.cpp create mode 100644 src/services/script_connection/script_connection.hpp create mode 100644 src/services/script_connection/script_connection_service.cpp create mode 100644 src/services/script_connection/script_connection_service.hpp rename src/views/network/{view_session.cpp => view_network.cpp} (96%) diff --git a/src/backend/backend.cpp b/src/backend/backend.cpp index 74f7f759..653f2608 100644 --- a/src/backend/backend.cpp +++ b/src/backend/backend.cpp @@ -6,6 +6,7 @@ #include "script_patches.hpp" #include "services/context_menu/context_menu_service.hpp" #include "services/orbital_drone/orbital_drone.hpp" +#include "services/script_connection/script_connection_service.hpp" #include "services/squad_spawner/squad_spawner.hpp" #include "services/tunables/tunables_service.hpp" #include "services/vehicle/vehicle_control_service.hpp" @@ -98,6 +99,9 @@ namespace big looped::session_auto_kick_host(); looped::session_block_jobs(); + if (g_script_connection_service) + g_script_connection_service->on_tick(); + script::get_current()->yield(); } } diff --git a/src/backend/commands/player/toxic/kick_from_interior.cpp b/src/backend/commands/player/toxic/kick_from_interior.cpp index 0fcd272f..0515829b 100644 --- a/src/backend/commands/player/toxic/kick_from_interior.cpp +++ b/src/backend/commands/player/toxic/kick_from_interior.cpp @@ -6,6 +6,7 @@ #include "hooking.hpp" #include "natives.hpp" #include "pointers.hpp" +#include "services/script_connection/script_connection_service.hpp" #include "util/scripts.hpp" #include