Direct implementation of fix vectors (#3147)
This commit is contained in:
parent
254f64f1af
commit
fb07065aaf
@ -3,7 +3,7 @@ include(FetchContent)
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
gtav_classes
|
gtav_classes
|
||||||
GIT_REPOSITORY https://github.com/Yimura/GTAV-Classes.git
|
GIT_REPOSITORY https://github.com/Yimura/GTAV-Classes.git
|
||||||
GIT_TAG df0def702dac8f7ba9bf7107734ac30b4db54e96
|
GIT_TAG 46c1c63396cf40b206b9f5dd612f293809eefcd1
|
||||||
GIT_PROGRESS TRUE
|
GIT_PROGRESS TRUE
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
BUILD_COMMAND ""
|
BUILD_COMMAND ""
|
||||||
|
@ -61,7 +61,6 @@ namespace big::functions
|
|||||||
{
|
{
|
||||||
using run_script_threads = bool (*)(uint32_t ops_to_execute);
|
using run_script_threads = bool (*)(uint32_t ops_to_execute);
|
||||||
using get_native_handler = rage::scrNativeHandler (*)(rage::scrNativeRegistrationTable* registration_table, rage::scrNativeHash hash);
|
using get_native_handler = rage::scrNativeHandler (*)(rage::scrNativeRegistrationTable* registration_table, rage::scrNativeHash hash);
|
||||||
using fix_vectors = void (*)(rage::scrNativeCallContext* call_ctx);
|
|
||||||
|
|
||||||
using get_net_game_player = CNetGamePlayer* (*)(Player player);
|
using get_net_game_player = CNetGamePlayer* (*)(Player player);
|
||||||
|
|
||||||
|
@ -87,7 +87,6 @@ namespace big
|
|||||||
functions::handle_to_ptr m_handle_to_ptr;
|
functions::handle_to_ptr m_handle_to_ptr;
|
||||||
rage::scrNativeRegistrationTable* m_native_registration_table;
|
rage::scrNativeRegistrationTable* m_native_registration_table;
|
||||||
functions::get_native_handler m_get_native_handler;
|
functions::get_native_handler m_get_native_handler;
|
||||||
functions::fix_vectors m_fix_vectors;
|
|
||||||
|
|
||||||
rage::atArray<GtaThread*>* m_script_threads;
|
rage::atArray<GtaThread*>* m_script_threads;
|
||||||
rage::scrProgramTable* m_script_program_table;
|
rage::scrProgramTable* m_script_program_table;
|
||||||
|
@ -19,6 +19,12 @@ namespace big
|
|||||||
|
|
||||||
void native_invoker::fix_vectors()
|
void native_invoker::fix_vectors()
|
||||||
{
|
{
|
||||||
g_pointers->m_gta.m_fix_vectors(&m_call_context);
|
for (; m_call_context.m_data_count; m_call_context.m_orig[m_call_context.m_data_count][2].Int = m_call_context.m_buffer[m_call_context.m_data_count].z)
|
||||||
|
{
|
||||||
|
--m_call_context.m_data_count;
|
||||||
|
m_call_context.m_orig[m_call_context.m_data_count]->Int = m_call_context.m_buffer[m_call_context.m_data_count].x;
|
||||||
|
m_call_context.m_orig[m_call_context.m_data_count][1].Int = m_call_context.m_buffer[m_call_context.m_data_count].y;
|
||||||
|
}
|
||||||
|
--m_call_context.m_data_count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,15 +104,6 @@ namespace big
|
|||||||
g_pointers->m_gta.m_get_native_handler = ptr.add(12).rip().as<functions::get_native_handler>();
|
g_pointers->m_gta.m_get_native_handler = ptr.add(12).rip().as<functions::get_native_handler>();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Fix Vectors
|
|
||||||
{
|
|
||||||
"FV",
|
|
||||||
"83 79 18 00 48 8B D1 74 4A FF 4A 18 48 63 4A 18 48 8D 41 04 48 8B 4C CA",
|
|
||||||
[](memory::handle ptr)
|
|
||||||
{
|
|
||||||
g_pointers->m_gta.m_fix_vectors = ptr.as<functions::fix_vectors>();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// Script Threads
|
// Script Threads
|
||||||
{
|
{
|
||||||
"ST",
|
"ST",
|
||||||
|
Reference in New Issue
Block a user