General improvements (#1693)

* remove(replay): remove replay interface
* fix(context_menu): better console controls
* feat(protections): improve protections
* feat(protections): actually fix parachute crash
* feat(protections): kick rejoin
* feat(context_menu): more context menu stuff
This commit is contained in:
maybegreat48
2023-07-12 17:03:29 +00:00
committed by GitHub
parent 3b7c103873
commit bd84dbaa40
35 changed files with 375 additions and 279 deletions
+14 -4
View File
@@ -21,9 +21,6 @@ namespace big
if (!player->get_ped())
return false;
if (!NETWORK::NETWORK_ARE_PLAYERS_IN_SAME_TUTORIAL_SESSION(self::id, player->id()))
return false; // probably not
if (scr_globals::globalplayer_bd.as<GlobalPlayerBD*>()->Entries[player->id()].IsInvisible)
return true;
@@ -62,7 +59,17 @@ namespace big
{
case rage::eEventNetworkType::CEventNetworkRemovedFromSessionDueToComplaints:
{
g_notification_service->push_warning("KICKED"_T.data(), "USER_DESYNC_KICKED"_T.data());
if (g.protections.kick_rejoin && !NETWORK::NETWORK_IS_ACTIVITY_SESSION() && SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(RAGE_JOAAT("maintransition")) == 0 && !STREAMING::IS_PLAYER_SWITCH_IN_PROGRESS())
{
g_fiber_pool->queue_job([] {
session::join_session(gta_util::get_network()->m_last_joined_session.m_session_info);
});
g_notification_service->push_warning("KICKED"_T.data(), "You have been desync kicked. Rejoining previous session...");
}
else
{
g_notification_service->push_warning("KICKED"_T.data(), "USER_DESYNC_KICKED"_T.data());
}
break;
}
case rage::eEventNetworkType::CEventNetworkEntityDamage:
@@ -101,6 +108,9 @@ namespace big
if (NETWORK::NETWORK_IS_ACTIVITY_SESSION())
break;
if (!NETWORK::NETWORK_ARE_PLAYERS_IN_SAME_TUTORIAL_SESSION(self::id, player->id()))
break;
if (globals::get_interior_from_player(player->id()) != 0)
break;