Update for b3351 (#21)
Some checks are pending
Nightly Build / Check Recent Commit (push) Successful in 42s
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-10-20 19:00:48 +02:00 committed by GitHub
parent c28bcb9872
commit f844e77a0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 27 additions and 36 deletions

View File

@ -32,6 +32,7 @@ namespace big
void backend::loop() void backend::loop()
{ {
*g_pointers->m_gta.m_minority_report = "POGROM"_J;
bypass_battleye(); bypass_battleye();
for (auto& command : g_bool_commands) for (auto& command : g_bool_commands)

View File

@ -420,7 +420,7 @@ namespace big
PVOID m_network_can_access_multiplayer; PVOID m_network_can_access_multiplayer;
PVOID m_send_clone_create; uint32_t* m_minority_report;
}; };
#pragma pack(pop) #pragma pack(pop)
static_assert(sizeof(gta_pointers) % 8 == 0, "Pointers are not properly aligned"); static_assert(sizeof(gta_pointers) % 8 == 0, "Pointers are not properly aligned");

View File

@ -83,7 +83,9 @@ namespace big
detour_hook_helper::add<hooks::serialize_join_request_message>("SJRM", g_pointers->m_gta.m_serialize_join_request_message); detour_hook_helper::add<hooks::serialize_join_request_message>("SJRM", g_pointers->m_gta.m_serialize_join_request_message);
detour_hook_helper::add<hooks::serialize_join_request_message_2>("SJRM2", g_pointers->m_gta.m_serialize_join_request_message_2); detour_hook_helper::add<hooks::serialize_join_request_message_2>("SJRM2", g_pointers->m_gta.m_serialize_join_request_message_2);
#if 0
detour_hook_helper::add<hooks::start_matchmaking_find_sessions>("SMFS", g_pointers->m_gta.m_start_matchmaking_find_sessions); detour_hook_helper::add<hooks::start_matchmaking_find_sessions>("SMFS", g_pointers->m_gta.m_start_matchmaking_find_sessions);
#endif
detour_hook_helper::add<hooks::broadcast_net_array>("BNA", g_pointers->m_gta.m_broadcast_net_array); detour_hook_helper::add<hooks::broadcast_net_array>("BNA", g_pointers->m_gta.m_broadcast_net_array);
@ -158,8 +160,6 @@ namespace big
detour_hook_helper::add<hooks::network_can_access_multiplayer>("NCAM", g_pointers->m_gta.m_network_can_access_multiplayer); detour_hook_helper::add<hooks::network_can_access_multiplayer>("NCAM", g_pointers->m_gta.m_network_can_access_multiplayer);
detour_hook_helper::add<hooks::send_clone_create>("SCC", g_pointers->m_gta.m_send_clone_create);
g_hooking = this; g_hooking = this;
} }

View File

@ -214,9 +214,7 @@ namespace big
static void* create_pool_item(GenericPool* pool); static void* create_pool_item(GenericPool* pool);
static bool network_can_access_multiplayer(void* a1, int* error); static uint32_t network_can_access_multiplayer(uint32_t a1, uint64_t* a2);
static void send_clone_create(CNetworkObjectMgr* _this, rage::netObject* object, CNetGamePlayer* player, rage::datBitBuffer* buffer);
}; };
class minhook_keepalive class minhook_keepalive

View File

@ -2,11 +2,11 @@
namespace big namespace big
{ {
bool hooks::network_can_access_multiplayer(void* a1, int* error) uint32_t hooks::network_can_access_multiplayer(uint32_t a1, uint64_t* a2)
{ {
if (error) if (a2)
*error = 0; *a2 = 0;
return true; return 0;
} }
} }

View File

@ -1,17 +0,0 @@
#include "hooking/hooking.hpp"
#include "services/players/player_service.hpp"
#include <network/CNetGamePlayer.hpp>
namespace big
{
void hooks::send_clone_create(CNetworkObjectMgr* _this, rage::netObject* object, CNetGamePlayer* player, rage::datBitBuffer* buffer)
{
if (auto plyr = g_player_service->get_by_id(player->m_player_id); plyr && plyr->bad_host && (eNetObjType)object->m_object_type == eNetObjType::NET_OBJ_TYPE_PLAYER)
{
return;
}
g_hooking->get_original<hooks::send_clone_create>()(_this, object, player, buffer);
}
}

View File

@ -3,7 +3,7 @@
#include "gta_pointers_layout_info.hpp" #include "gta_pointers_layout_info.hpp"
#include "sc_pointers_layout_info.hpp" #include "sc_pointers_layout_info.hpp"
#define GTA_VERSION_TARGET "1.69-3337" #define GTA_VERSION_TARGET "1.69-3351"
namespace big namespace big
{ {
@ -582,6 +582,7 @@ namespace big
g_pointers->m_gta.m_start_get_session_by_gamer_handle = ptr.add(1).rip().as<functions::start_get_session_by_gamer_handle>(); g_pointers->m_gta.m_start_get_session_by_gamer_handle = ptr.add(1).rip().as<functions::start_get_session_by_gamer_handle>();
} }
}, },
#if 0
// Start Matchmaking Find Sessions // Start Matchmaking Find Sessions
{ {
"SMFS", "SMFS",
@ -591,13 +592,14 @@ namespace big
g_pointers->m_gta.m_start_matchmaking_find_sessions = ptr.add(6).rip().as<functions::start_matchmaking_find_sessions>(); g_pointers->m_gta.m_start_matchmaking_find_sessions = ptr.add(6).rip().as<functions::start_matchmaking_find_sessions>();
} }
}, },
#endif
// Join Session By Info // Join Session By Info
{ {
"JSBI", "JSBI",
"E8 ? ? ? ? 0F B6 CB 84 C0 41 0F 44 CD", "89 6C 24 28 4C 89 74 24 20 E8 ? ? ? ? EB 02 32 C0 48 8B 5C 24 40",
[](memory::handle ptr) [](memory::handle ptr)
{ {
g_pointers->m_gta.m_join_session_by_info = ptr.add(1).rip().as<functions::join_session_by_info>(); g_pointers->m_gta.m_join_session_by_info = ptr.add(10).rip().as<functions::join_session_by_info>();
} }
}, },
// Invite Player By Gamer Handle // Invite Player By Gamer Handle
@ -1981,19 +1983,19 @@ namespace big
// Network Can Access Multiplayer // Network Can Access Multiplayer
{ {
"NCAM", "NCAM",
"E8 ? ? ? ? 8B 54 24 30 89 13", "E9 26 01 00 00 33 D2 8B CB",
[](memory::handle ptr) [](memory::handle ptr)
{ {
g_pointers->m_gta.m_network_can_access_multiplayer = ptr.add(1).rip().as<PVOID>(); g_pointers->m_gta.m_network_can_access_multiplayer = ptr.add(10).rip().as<PVOID>();
} }
}, },
// Send Clone Create // Minority Report
{ {
"SCC", "MR",
"48 8B 02 4D 8B F8", "44 8D 40 03 48 8D 0D",
[](memory::handle ptr) [](memory::handle ptr)
{ {
g_pointers->m_gta.m_send_clone_create = ptr.sub(0x1C).as<PVOID>(); g_pointers->m_gta.m_minority_report = ptr.add(7).rip().as<uint32_t*>();
} }
} }
>(); // don't leave a trailing comma at the end >(); // don't leave a trailing comma at the end
@ -2106,6 +2108,9 @@ namespace big
const auto mem_region = memory::module("GTA5.exe"); const auto mem_region = memory::module("GTA5.exe");
// TODO: this is far from ideal, but it is impossible to find a signature for this anymore
g_pointers->m_gta.m_start_matchmaking_find_sessions = mem_region.begin().add(0x148626C).as<functions::start_matchmaking_find_sessions>();
constexpr auto gta_batch_and_hash = pointers::get_gta_batch(); constexpr auto gta_batch_and_hash = pointers::get_gta_batch();
constexpr cstxpr_str gta_batch_name{"GTA5"}; constexpr cstxpr_str gta_batch_name{"GTA5"};
write_to_cache_or_read_from_cache<gta_batch_name, write_to_cache_or_read_from_cache<gta_batch_name,

View File

@ -69,7 +69,9 @@ namespace big
} }
}; };
#if 0
battleye_server g_battleye_server("battleyeserver", "BATTLEYE_SERVER", "BATTLEYE_SERVER_DESC", g.debug.battleye_server); battleye_server g_battleye_server("battleyeserver", "BATTLEYE_SERVER", "BATTLEYE_SERVER_DESC", g.debug.battleye_server);
#endif
bool battleye_service::is_running() bool battleye_service::is_running()
{ {

View File

@ -44,6 +44,8 @@ namespace big
bool matchmaking_service::matchmake(std::optional<int> constraint, std::optional<bool> enforce_player_limit) bool matchmaking_service::matchmake(std::optional<int> constraint, std::optional<bool> enforce_player_limit)
{ {
return false; // TODO
for (auto& session : m_found_sessions) for (auto& session : m_found_sessions)
{ {
session.is_valid = true; session.is_valid = true;