refactor(RIDJoiner): Cleaned up some old broken code

This commit is contained in:
Yimura 2021-01-14 21:36:06 +01:00
parent 3123ffb76f
commit e667330eaf
5 changed files with 0 additions and 45 deletions

View File

@ -2,7 +2,6 @@
#include "common.hpp"
#include "gta/fwddec.hpp"
#include "gta/natives.hpp"
#include "features/rid_joiner.hpp"
namespace big::functions
{
@ -20,10 +19,4 @@ namespace big::functions
using spectate_player = bool(bool toggle, Ped player);
using sync_local_time = void(int h, int m);
using trigger_script_event = int(bool unk0, int64_t* args, int argCount, int bitFlags);
// R* Joiner
using get_session_info_from_gs = bool(gs_session* session, const char* gs, int a3, int a4);
using join_player_via_session_info = void(net_msg_identifier* identifier, gs_session* session_info, int flag);
using read_session_response = bool(uint64_t rcx);
using send_session_info_request = void(rockstar_identifier* target, int count);
}

View File

@ -42,7 +42,6 @@ namespace big
m_get_event_data("Get Event Data", g_pointers->m_get_event_data, &hooks::get_event_data),
m_error_screen_hook("Disable Warning/Error Screen", g_pointers->m_error_screen, &hooks::error_screen),
m_increment_stat_hook("Increment Stat Event", g_pointers->m_increment_stat_event, &hooks::increment_stat_event),
m_read_session_response("Read Session Response", g_pointers->m_read_session_response, &hooks::read_session_response),
m_script_event_hook("Script Event Handler", g_pointers->m_script_event_handler, &hooks::script_event_handler)
{
m_swapchain_hook.hook(hooks::swapchain_present_index, &hooks::swapchain_present);
@ -72,7 +71,6 @@ namespace big
m_get_event_data.enable();
m_error_screen_hook.enable();
m_increment_stat_hook.enable();
m_read_session_response.enable();
m_script_event_hook.enable();
m_enabled = true;
@ -93,7 +91,6 @@ namespace big
m_get_event_data.disable();
m_error_screen_hook.disable();
m_increment_stat_hook.disable();
m_read_session_response.disable();
m_script_event_hook.disable();
}

View File

@ -25,7 +25,6 @@ namespace big
static bool get_event_data(int32_t eventGroup, int32_t eventIndex, int64_t* args, uint32_t argCount);
static void error_screen(char* entryHeader, char* entryLine1, int instructionalKey, char* entryLine2, BOOL p4, Any p5, Any* p6, Any* p7, BOOL background);
static bool increment_stat_event(uint64_t net_event_struct, int64_t sender, int64_t a3);
static bool read_session_response(uint64_t rcx);
static bool script_event_handler(std::int64_t NetEventStruct, std::int64_t CNetGamePlayer);
};
@ -60,7 +59,6 @@ namespace big
detour_hook m_get_event_data;
detour_hook m_error_screen_hook;
detour_hook m_increment_stat_hook;
detour_hook m_read_session_response;
detour_hook m_script_event_hook;
};

View File

@ -122,32 +122,6 @@ namespace big
{
m_get_event_data = ptr.sub(28).as<decltype(m_get_event_data)>();
});
// R* Id
main_batch.add("Send Session Info Request", "48 8B C4 48 89 58 08 48 89 68 10 48 89 70 18 48 89 78 20 41 56 48 83 EC 30 48 83 3D ? ? ? ? ? 8B", [this](memory::handle ptr)
{
m_send_session_info_request = ptr.as<decltype(m_send_session_info_request)>();
});
main_batch.add("Join Player Via Session Info", "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 81 EC ? ? ? ? 4C 8B F9 B1 01 49 8B F1 49 8B E8 44 8B F2 E8", [this](memory::handle ptr)
{
m_join_player_via_session_info = ptr.as<decltype(m_join_player_via_session_info)>();
});
main_batch.add("Rockstar Info", "48 8D 05 ? ? ? ? 4D 69 C0 ? ? ? ? 4C 03 C0 41 83 B8 ? ? ? ? ? 0F 86 ? ? ? ? 83 CD FF 48 8D 15", [this](memory::handle ptr)
{
m_rs_info = ptr.as<decltype(m_rs_info)>();
});
main_batch.add("Get Session Info From GS", "48 8B C4 48 89 58 08 48 89 68 10 56 57 41 56 48 81 EC ? ? ? ? 48 8B F2 33 D2 49 8B F8 4C 8B F1 44 8D 42", [this](memory::handle ptr)
{
m_get_session_info_from_gs = ptr.as<decltype(m_get_session_info_from_gs)>();
});
main_batch.add("Read Session Response Hook", "48 8B C4 48 89 58 08 48 89 70 10 48 89 78 18 55 41 54 41 56 48 8D 68 D8 48 81 EC ? ? ? ? 45 33 F6 48 8B F9 45", [this](memory::handle ptr)
{
m_read_session_response = ptr.as<decltype(m_read_session_response)>();
});
main_batch.run(memory::module(nullptr));

View File

@ -3,7 +3,6 @@
#include "gta/fwddec.hpp"
#include "gta/enums.hpp"
#include "function_types.hpp"
#include "features/rid_joiner.hpp"
namespace big
{
@ -46,12 +45,6 @@ namespace big
functions::spectate_player* m_spectate_player{};
functions::sync_local_time* m_sync_local_time{};
functions::trigger_script_event* m_trigger_script_event{};
rs_info *m_rs_info{};
functions::get_session_info_from_gs* m_get_session_info_from_gs{};
functions::join_player_via_session_info* m_join_player_via_session_info{};
functions::read_session_response* m_read_session_response{};
functions::send_session_info_request* m_send_session_info_request{};
};
inline pointers *g_pointers{};