Fix early injection (#45)
Some checks are pending
Nightly Build / Check Recent Commit (push) Successful in 1m13s
Nightly Build / Build Nightly (push) Waiting to run
Nightly Build / Recreate Release (push) Blocked by required conditions

This commit is contained in:
Mr-X-GTA 2024-11-29 21:20:40 +01:00 committed by GitHub
parent b7f5729a78
commit 6edc483502
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 0 deletions

View File

@ -86,6 +86,9 @@ namespace big
weapons::m_no_sway_patch = memory::byte_patch::make(g_pointers->m_gta.m_scope_sway_function, std::vector{0xEB}).get();
memory::byte_patch::make(g_pointers->m_gta.m_report_myself_sender, std::vector{0xC3})->apply();
// Patch BattlEye network bail
memory::byte_patch::make(g_pointers->m_gta.m_be_network_bail_patch, std::to_array({0xC3}))->apply();
}
byte_patch_manager::byte_patch_manager()

View File

@ -419,6 +419,8 @@ namespace big
functions::get_last_keyboard_state m_get_last_keyboard_state;
PVOID m_network_can_access_multiplayer;
PVOID m_be_network_bail_patch;
};
#pragma pack(pop)
static_assert(sizeof(gta_pointers) % 8 == 0, "Pointers are not properly aligned");

View File

@ -1988,6 +1988,15 @@ namespace big
{
g_pointers->m_gta.m_network_can_access_multiplayer = ptr.add(10).rip().as<PVOID>();
}
},
// BattlEye Network Bail Patch
{
"BENBP",
"83 25 ? ? ? ? 00 89 0D ? ? ? ? 85 C9",
[](memory::handle ptr)
{
g_pointers->m_gta.m_be_network_bail_patch = ptr.add(17).rip().add(1).rip().as<PVOID>();
}
}
>(); // don't leave a trailing comma at the end