Some bug fixes (#5)

* fix: fix player tracking

* Merge "Update globals for build 3323"

* update chat filter

* fix: fix complaint kicks
This commit is contained in:
Mr-X-GTA 2024-09-30 00:03:31 +02:00 committed by GitHub
parent 82b8eaef39
commit 7f29e70f4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 13 deletions

View File

@ -20,7 +20,9 @@ namespace big
return;
if (gta_util::get_network()->m_game_session_ptr->is_host())
{
gta_util::get_network()->m_game_complaint_mgr.raise_complaint(player->get_net_data()->m_host_token);
auto& mgr = *(CNetComplaintMgr*)((uint64_t)gta_util::get_network() + 0x2E5A8);
mgr.raise_complaint(player->get_net_data()->m_host_token);
// TODO gta_util::get_network()->m_game_complaint_mgr.raise_complaint(player->get_net_data()->m_host_token);
return;
}

View File

@ -11,23 +11,25 @@ namespace big
{
void looped::system_update_desync_kick()
{
memset(&gta_util::get_network()->m_game_complaint_mgr.m_host_tokens_complained, 0, 64 * sizeof(uint64_t));
gta_util::get_network()->m_game_complaint_mgr.m_num_tokens_complained = 0;
// TODO
auto& mgr = *(CNetComplaintMgr*)((uint64_t)gta_util::get_network() + 0x2E5A8);
memset(&mgr.m_host_tokens_complained, 0, 64 * sizeof(uint64_t));
mgr.m_num_tokens_complained = 0;
for (auto& player : g_player_service->players())
{
if (player.second->is_valid() && player.second->trigger_desync_kick)
{
gta_util::get_network()->m_game_complaint_mgr.raise_complaint(player.second->get_net_data()->m_host_token);
mgr.raise_complaint(player.second->get_net_data()->m_host_token);
}
}
if (gta_util::get_network()->m_game_session_state > 3 && gta_util::get_network()->m_game_session_state < 6
&& gta_util::get_network()->m_game_complaint_mgr.m_num_tokens_complained && g_player_service->get_self()->is_valid()
&& mgr.m_num_tokens_complained && g_player_service->get_self()->is_valid()
&& !g_player_service->get_self()->is_host())
{
g_pointers->m_gta.m_reset_network_complaints(&gta_util::get_network()->m_game_complaint_mgr);
g_pointers->m_gta.m_reset_network_complaints(&mgr);
}
}
}

View File

@ -13,7 +13,7 @@ namespace big::scr_globals
static inline const script_global gpbd_fm_1(1845281);
static inline const script_global interiors(1943520);
static inline const script_global launcher_global(2699171);
static inline const script_global launcher_global(2699172);
// creator globals usually remain the same after updates
static inline const script_global terminate_creator(1574607); // NETWORK::NETWORK_BAIL(1, 0, 0); fm_*_creator
@ -22,12 +22,12 @@ namespace big::scr_globals
static inline const script_global mission_creator_exited(1574530);
static inline const script_global transition_state(1575011);
static inline const script_global sctv_spectator(2697731); // pausemenu_multiplayer function 0xE49C42EC
static inline const script_global sctv_spectator(2697732); // pausemenu_multiplayer function 0xE49C42EC
static inline const script_global vehicle_global(1586521);
static inline const script_global freemode_properties(2672855);
static inline const script_global freemode_global(2738934);
static inline const script_global freemode_global(2738935);
static inline const script_global spawn_global(2696212);
@ -42,9 +42,9 @@ namespace big::scr_globals
static inline const script_global session5(1575010);
static inline const script_global session6(2696130); // freemode -> if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS() && !NETWORK::NETWORK_IS_ACTIVITY_SESSION())
static inline const script_global interaction_menu_access(2710429); // am_pi_menu -> if (NETWORK::NETWORK_IS_SIGNED_ONLINE()) first global after that
static inline const script_global interaction_menu_access(2710430); // am_pi_menu -> if (NETWORK::NETWORK_IS_SIGNED_ONLINE()) first global after that
static inline const script_global disable_wasted_sound(2707679); // freemode -> AUDIO::PLAY_SOUND_FRONTEND(-1, "Wasted", "POWER_PLAY_General_Soundset", true);
static inline const script_global disable_wasted_sound(2707680); // freemode -> AUDIO::PLAY_SOUND_FRONTEND(-1, "Wasted", "POWER_PLAY_General_Soundset", true);
static inline const script_global passive(1574582); // if (((!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::GET_PLAYER_PED(bVar1), false) || Global_

View File

@ -757,7 +757,6 @@ namespace big
g_fiber_pool->queue_job([player] {
entity::force_remove_network_entity(g_local_player, player, false);
});
g_battleye_service.send_message_to_server(player->get_net_game_player()->get_host_token(), &data, size);
}
break;

View File

@ -345,7 +345,7 @@ namespace big
void player_database_service::update_player_states(bool tracked_only)
{
constexpr auto bucket_size = 100;
constexpr auto bucket_size = 32;
std::vector<std::vector<rage::rlScHandle>> gamer_handle_buckets{};

View File

@ -68,6 +68,7 @@ namespace
"10-30m",
"hey guys! tired of being poor?",
"gta cash",
"gta.cash",
"discord todo",
"\xE6\x89\xA3\xE6\x89\xA3", // QQ
"\xE4\xBC\xA0\xE5\xAA\x92", // AV