From a8133074ad93f010a4c49815283355e0b21effe6 Mon Sep 17 00:00:00 2001 From: tupoy-ya <72797377+tupoy-ya@users.noreply.github.com> Date: Mon, 24 Apr 2023 03:06:20 +0500 Subject: [PATCH] fix(Crash): Fixed crashes in SP Missions. (#1285) chore(hooking.hpp): Removed useless declarations. --- src/hooking.hpp | 4 ---- src/hooks/script/script_handler.cpp | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/hooking.hpp b/src/hooking.hpp index 1dbfde2a..224c6cf4 100644 --- a/src/hooking.hpp +++ b/src/hooking.hpp @@ -132,10 +132,6 @@ namespace big static CGameScriptHandler* create_script_handler(CGameScriptHandlerMgr* this_, void* unk); static bool script_handler_is_networked(CGameScriptHandler* this_); static bool script_handler_dtor(CGameScriptHandler* this_, bool free_memory); - static void set_script_as_networked(void*, rage::scrThread* thread, int instance_id); - - static bool write_bitbuffer_gamer_handle(rage::datBitBuffer* buffer, rage::rlGamerHandle* handle); - static bool read_bitbuffer_gamer_handle(rage::datBitBuffer* buffer, rage::rlGamerHandle* handle); static int nt_query_virtual_memory(void* _this, HANDLE handle, PVOID base_addr, int info_class, MEMORY_BASIC_INFORMATION* info, int size, size_t* return_len); static void queue_dependency(void* dependency); diff --git a/src/hooks/script/script_handler.cpp b/src/hooks/script/script_handler.cpp index e73300e9..9fd576ee 100644 --- a/src/hooks/script/script_handler.cpp +++ b/src/hooks/script/script_handler.cpp @@ -1,5 +1,6 @@ #include "gta/script_handler.hpp" +#include "pointers.hpp" #include "hooking.hpp" namespace big @@ -29,7 +30,7 @@ namespace big bool hooks::script_handler_is_networked(CGameScriptHandler* _this) { - return true; + return *g_pointers->m_gta.m_is_session_started; } bool hooks::script_handler_dtor(CGameScriptHandler* _this, bool free_memory)