This repository has been archived on 2024-10-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
YimMenu/src/hooks/matchmaking/update_session_advertisement.cpp
T
2024-05-24 23:17:54 +02:00

21 lines
760 B
C++

#include "hooking/hooking.hpp"
#include "services/matchmaking/matchmaking_service.hpp"
#include <network/MatchmakingId.hpp>
namespace big
{
bool hooks::update_session_advertisement(int profile_index, MatchmakingId* id, int num_slots, int available_slots, rage::rlSessionInfo* info, MatchmakingAttributes* data, rage::rlTaskStatus* status)
{
if (g_matchmaking_service) [[likely]]
g_matchmaking_service->handle_update(num_slots, available_slots, info, data, id);
if (g.spoofing.increase_player_limit)
{
num_slots = 30;
available_slots = std::max(1, available_slots);
}
return g_hooking->get_original<hooks::update_session_advertisement>()(profile_index, id, num_slots, available_slots, info, data, status);
}
}