fix: fix pointers version
This commit is contained in:
parent
1c8bb41b8e
commit
591c1072b8
@ -5,11 +5,29 @@
|
|||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
|
static bool is_next_in_queue()
|
||||||
|
{
|
||||||
|
uint64_t my_host_token = g_player_service->get_self()->get_net_data()->m_host_token;
|
||||||
|
|
||||||
|
for (const auto& plyr : g_player_service->players() | std::ranges::views::values)
|
||||||
|
{
|
||||||
|
if (plyr->is_host())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (plyr->get_net_data()->m_host_token < my_host_token)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool bLastKickHost = false;
|
static bool bLastKickHost = false;
|
||||||
void looped::session_auto_kick_host()
|
void looped::session_auto_kick_host()
|
||||||
{
|
{
|
||||||
bool kick_host = *g_pointers->m_gta.m_is_session_started && g.session.spoof_host_token_type != 0 && g.session.kick_host_when_forcing_host;
|
bool kick_host = *g_pointers->m_gta.m_is_session_started && g.session.spoof_host_token_type != 0 && g.session.kick_host_when_forcing_host;
|
||||||
if (kick_host && !bLastKickHost) [[unlikely]]
|
if (kick_host && !bLastKickHost && is_next_in_queue()) [[unlikely]]
|
||||||
{
|
{
|
||||||
g_player_service->iterate([](auto& plyr) {
|
g_player_service->iterate([](auto& plyr) {
|
||||||
// Don't kick trusted players
|
// Don't kick trusted players
|
||||||
|
@ -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-3274"
|
#define GTA_VERSION_TARGET "1.69-3323"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user