This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/hooks/misc/serialize_player_data_msg.cpp

19 lines
502 B
C++
Raw Normal View History

2022-11-24 21:49:05 +00:00
#include "hooking.hpp"
#include "gta_util.hpp"
#include <network/Network.hpp>
#include <network/CNetGamePlayerDataMsg.hpp>
namespace big
{
bool hooks::serialize_player_data_msg(CNetGamePlayerDataMsg* msg, rage::datBitBuffer* buffer)
{
int old_group = msg->m_matchmaking_group;
if (g->session.join_in_sctv_slots)
msg->m_matchmaking_group = 4;
bool ret = g_hooking->get_original<hooks::serialize_player_data_msg>()(msg, buffer);
msg->m_matchmaking_group = old_group;
return ret;
}
}