mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-10 11:09:45 +08:00
Update for b3351 (#21)
This commit is contained in:
parent
c28bcb9872
commit
f844e77a0c
src
@ -32,6 +32,7 @@ namespace big
|
||||
|
||||
void backend::loop()
|
||||
{
|
||||
*g_pointers->m_gta.m_minority_report = "POGROM"_J;
|
||||
bypass_battleye();
|
||||
|
||||
for (auto& command : g_bool_commands)
|
||||
|
@ -420,7 +420,7 @@ namespace big
|
||||
|
||||
PVOID m_network_can_access_multiplayer;
|
||||
|
||||
PVOID m_send_clone_create;
|
||||
uint32_t* m_minority_report;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
static_assert(sizeof(gta_pointers) % 8 == 0, "Pointers are not properly aligned");
|
||||
|
@ -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_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);
|
||||
#endif
|
||||
|
||||
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::send_clone_create>("SCC", g_pointers->m_gta.m_send_clone_create);
|
||||
|
||||
g_hooking = this;
|
||||
}
|
||||
|
||||
|
@ -214,9 +214,7 @@ namespace big
|
||||
|
||||
static void* create_pool_item(GenericPool* pool);
|
||||
|
||||
static bool network_can_access_multiplayer(void* a1, int* error);
|
||||
|
||||
static void send_clone_create(CNetworkObjectMgr* _this, rage::netObject* object, CNetGamePlayer* player, rage::datBitBuffer* buffer);
|
||||
static uint32_t network_can_access_multiplayer(uint32_t a1, uint64_t* a2);
|
||||
};
|
||||
|
||||
class minhook_keepalive
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
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)
|
||||
*error = 0;
|
||||
if (a2)
|
||||
*a2 = 0;
|
||||
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
#include "gta_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
|
||||
{
|
||||
@ -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>();
|
||||
}
|
||||
},
|
||||
#if 0
|
||||
// Start Matchmaking Find Sessions
|
||||
{
|
||||
"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>();
|
||||
}
|
||||
},
|
||||
#endif
|
||||
// Join Session By Info
|
||||
{
|
||||
"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)
|
||||
{
|
||||
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
|
||||
@ -1981,19 +1983,19 @@ namespace big
|
||||
// Network Can Access Multiplayer
|
||||
{
|
||||
"NCAM",
|
||||
"E8 ? ? ? ? 8B 54 24 30 89 13",
|
||||
"E9 26 01 00 00 33 D2 8B CB",
|
||||
[](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",
|
||||
"48 8B 02 4D 8B F8",
|
||||
"MR",
|
||||
"44 8D 40 03 48 8D 0D",
|
||||
[](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
|
||||
@ -2106,6 +2108,9 @@ namespace big
|
||||
|
||||
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 cstxpr_str gta_batch_name{"GTA5"};
|
||||
write_to_cache_or_read_from_cache<gta_batch_name,
|
||||
|
@ -69,7 +69,9 @@ namespace big
|
||||
}
|
||||
};
|
||||
|
||||
#if 0
|
||||
battleye_server g_battleye_server("battleyeserver", "BATTLEYE_SERVER", "BATTLEYE_SERVER_DESC", g.debug.battleye_server);
|
||||
#endif
|
||||
|
||||
bool battleye_service::is_running()
|
||||
{
|
||||
|
@ -44,6 +44,8 @@ namespace big
|
||||
|
||||
bool matchmaking_service::matchmake(std::optional<int> constraint, std::optional<bool> enforce_player_limit)
|
||||
{
|
||||
return false; // TODO
|
||||
|
||||
for (auto& session : m_found_sessions)
|
||||
{
|
||||
session.is_valid = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user