diff --git a/cmake/gtav-classes.cmake b/cmake/gtav-classes.cmake index c2729411..f1d40d09 100644 --- a/cmake/gtav-classes.cmake +++ b/cmake/gtav-classes.cmake @@ -3,7 +3,7 @@ include(FetchContent) FetchContent_Declare( gtav_classes GIT_REPOSITORY https://github.com/Mr-X-GTA/GTAV-Classes-1.git - GIT_TAG b74e688860b0df47d7ec87c1eb6227ee853fc90a + GIT_TAG 9fa80bd650d37afd70056ec0f0c987cbc62e8a74 GIT_PROGRESS TRUE CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/src/backend/commands/player/kick/oom_kick.cpp b/src/backend/commands/player/kick/oom_kick.cpp index 985dab49..6aa7ebc4 100644 --- a/src/backend/commands/player/kick/oom_kick.cpp +++ b/src/backend/commands/player/kick/oom_kick.cpp @@ -16,7 +16,7 @@ namespace big virtual void execute(player_ptr player, const command_arguments& _args, const std::shared_ptr ctx) override { - if (!player || !player->is_valid()) + if (!player || !player->is_valid() || player->is_host()) return; packet msg{}; diff --git a/src/backend/commands/player/toxic/kick_from_interior.cpp b/src/backend/commands/player/toxic/kick_from_interior.cpp index c8133b07..9e6086e9 100644 --- a/src/backend/commands/player/toxic/kick_from_interior.cpp +++ b/src/backend/commands/player/toxic/kick_from_interior.cpp @@ -23,14 +23,14 @@ namespace big if (scr_globals::gpbd_fm_1.as()->Entries[player->id()].PropertyData.Index != -1) { auto cxn = g_script_connection_service->create_connection("am_mp_property_int", player); - cxn->set_host_broadcast_size(1319); + cxn->set_host_broadcast_size(1330); // cxn->set_player_broadcast_size(1185); cxn->set_no_remote_start(true); cxn->set_wait_for_host_broadcast_data(true); cxn->set_quick_cleanup(true); cxn->set_debug_logging(true); cxn->set_broadcast_modify_callback([](rage::scrThread* thread, uint64_t* server_vars, uint64_t* client_vars) { - server_vars[679] = 1; // this changes every update + server_vars[690] = 1; // this changes every update }); g_fiber_pool->queue_job([cxn] { diff --git a/src/core/data/all_script_names.hpp b/src/core/data/all_script_names.hpp index c3236288..773c09ff 100644 --- a/src/core/data/all_script_names.hpp +++ b/src/core/data/all_script_names.hpp @@ -219,6 +219,13 @@ namespace big "fm_content_weed_shop_delivery"_J, "fm_content_tycoon_odd_jobs"_J, "fm_content_cutscene"_J, + "fm_content_firefighter"_J, + "fm_content_forklift_operator"_J, + "fm_content_postal_worker"_J, + "fm_content_getaway_driver"_J, + "fm_content_survival_grouping"_J, + "fm_content_valentine_cheater"_J, + "fm_content_survival"_J, "AM_BOAT_TAXI"_J, "AM_HELI_TAXI"_J, "fm_hold_up_tut"_J, @@ -247,7 +254,7 @@ namespace big "fm_Bj_race_controler"_J, "fm_deathmatch_controler"_J, "fm_hideout_controler"_J, - "FM_Mission_controller"_J, + "fm_mission_controller"_J, "FM_Race_Controler"_J, "FM_Horde_Controler"_J, "dont_cross_the_line"_J, @@ -260,7 +267,9 @@ namespace big "gunslinger_arcade"_J, "wizard_arcade"_J, "AM_CASINO_LIMO"_J, + "AM_MANSION_LIMO"_J, "AM_CASINO_LUXURY_CAR"_J, + "AM_MANSION_LUXURY_CAR"_J, "Degenatron Games"_J, "ggsm_arcade"_J, "puzzle"_J, @@ -349,6 +358,8 @@ namespace big "am_lowrider_int", "am_lsia_take_off_cinematic", "am_luxury_showroom", + "am_mansion_limo", + "am_mansion_luxury_car", "am_mission_launch", "am_mp_acid_lab", "am_mp_arcade", @@ -389,6 +400,9 @@ namespace big "am_mp_ie_warehouse", "am_mp_island", "am_mp_juggalo_hideout", + "am_mp_mansion", + "am_mp_mansion_driveway", + "am_mp_mansion_garage", "am_mp_multistorey_garage", "am_mp_music_studio", "am_mp_nightclub", @@ -734,6 +748,9 @@ namespace big "fm_content_drug_lab_work", "fm_content_drug_vehicle", "fm_content_export_cargo", + "fm_content_firefighter", + "fm_content_forklift_operator", + "fm_content_getaway_driver", "fm_content_ghosthunt", "fm_content_golden_gun", "fm_content_gunrunning", @@ -759,6 +776,7 @@ namespace big "fm_content_phantom_car", "fm_content_pizza_delivery", "fm_content_possessed_animals", + "fm_content_postal_worker", "fm_content_robbery", "fm_content_security_contract", "fm_content_sightseeing", @@ -771,12 +789,15 @@ namespace big "fm_content_smuggler_trail", "fm_content_source_research", "fm_content_stash_house", + "fm_content_survival", + "fm_content_survival_grouping", "fm_content_taxi_driver", "fm_content_test", "fm_content_tow_truck_work", "fm_content_tuner_robbery", "fm_content_tycoon_odd_jobs", "fm_content_ufo_abduction", + "fm_content_valentine_cheater", "fm_content_vehicle_list", "fm_content_vehrob_arena", "fm_content_vehrob_cargo_ship", @@ -1019,6 +1040,19 @@ namespace big "maintransition", "main_install", "main_persistent", + "mansion_basement_seating", + "mansion_carmod", + "mansion_club_bar", + "mansion_club_seating", + "mansion_guest_bedroom_seating", + "mansion_lobby_seating", + "mansion_lower_basement_seating", + "mansion_lower_east_wing_seating", + "mansion_outside_seating", + "mansion_seating", + "mansion_upper_balcony_seating", + "mansion_upper_floor_seating", + "mansion_water_seating", "martin1", "maude1", "maude_postbailbond", @@ -1080,6 +1114,7 @@ namespace big "net_freemode_debug_2023", "net_freemode_debug_stat_2023", "net_jacking_soaktest", + "net_mansion_yoga", "net_session_soaktest", "net_test_drive", "net_tunable_check", @@ -1188,6 +1223,8 @@ namespace big "profiler_registration", "prologue1", "prop_drop", + "public_mission_controller", + "public_mission_creator", "puzzle", "racetest", "rampage1", @@ -1281,6 +1318,7 @@ namespace big "sh_intro_f_hills", "sh_intro_m_home", "simeon_showroom_seating", + "si_dancing_activity", "smoketest", "social_controller", "solomon1", diff --git a/src/core/data/block_join_reasons.hpp b/src/core/data/block_join_reasons.hpp index 97296417..60f682aa 100644 --- a/src/core/data/block_join_reasons.hpp +++ b/src/core/data/block_join_reasons.hpp @@ -63,25 +63,28 @@ namespace big // The session you are trying to join is private. You will need to be invited to join this session. InviteOnly = 22, - // The session you are trying to join is a different build type. - DifferentBuildType = 23, + // The session you are trying to join is private and friends only. You must be invited by a friend to join this session. + InviteAndFriendsOnly = 23, - UNK_24 = 24, + // The session you are trying to join is a different build type. + DifferentBuildType = 24, + + UNK_25 = 25, // The session you are trying to join is not using the same content. - DifferentContent = 25, + DifferentContent = 26, // The session you are trying to join is friends only. - FriendsOnly = 26, + FriendsOnly = 27, // Unable to join this session, your account has a bad reputation. - BadReputation = 27, + BadReputation = 28, // Unable to connect to session. The session may no longer exist. - MayNotExist = 28, + MayNotExist = 29, // Unable to Join. The session you are trying to join is a Premium Race. Joining and accepting invites is disabled for this mode. - PremiumRace = 29 + PremiumRace = 30 }; inline block_join_reason_t& operator++(block_join_reason_t& reason) @@ -122,12 +125,13 @@ namespace big "Cheaters Only", // 20 "Session No Longer Exists", // 21 "Invite Only", // 22 - "Different Build Type", // 23 - "", // 24 - "Different Content", // 25 - "Friends Only", // 26 - "Bad Reputation", // 27 - "May Not Exist", // 28 - "Premium Race" // 29 + "Invite And Friends Only", // 23 + "Different Build Type", // 24 + "", // 25 + "Different Content", // 26 + "Friends Only", // 27 + "Bad Reputation", // 28 + "May Not Exist", // 29 + "Premium Race" // 30 }); } \ No newline at end of file diff --git a/src/core/data/stack_sizes.hpp b/src/core/data/stack_sizes.hpp index a2602ae7..11ce5e63 100644 --- a/src/core/data/stack_sizes.hpp +++ b/src/core/data/stack_sizes.hpp @@ -10,7 +10,7 @@ namespace big {"SPECIAL_ABILITY", 1828}, {"FRIEND", 2050}, {"SHOP", 2324}, - {"CELLPHONE", 2552}, + {"CELLPHONE", 2600}, {"VEHICLE_SPAWN", 3568}, {"CAR_MOD_SHOP", 3750}, {"PAUSE_MENU_SCRIPT", 3076}, @@ -28,9 +28,9 @@ namespace big {"AM_MP_YACHT", 5000}, {"INGAMEHUD", 4600}, {"TRANSITION", 8032}, - {"FMMC_LAUNCHER", 27000}, - {"MULTIPLAYER_FREEMODE", 85000}, - {"MISSION", 62500}, - {"MP_LAUNCH_SCRIPT", 34750}, + {"FMMC_LAUNCHER", 28000}, + {"MULTIPLAYER_FREEMODE", 89500}, + {"MISSION", 64500}, + {"MP_LAUNCH_SCRIPT", 35250}, }; } \ No newline at end of file diff --git a/src/hooks/info/get_network_event_data.cpp b/src/hooks/info/get_network_event_data.cpp index 3860c93c..1d8ea728 100644 --- a/src/hooks/info/get_network_event_data.cpp +++ b/src/hooks/info/get_network_event_data.cpp @@ -61,7 +61,7 @@ namespace big if (g.protections.kick_rejoin && !NETWORK::NETWORK_IS_ACTIVITY_SESSION() && SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH("maintransition"_J) == 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); + session::join_session(gta_util::get_network()->m_last_joined_session); }); g_notification_service.push_warning("KICKED"_T.data(), "USER_DESYNC_KICKED_REJOIN"_T.data()); } diff --git a/src/hooks/misc/game_skeleton_update.cpp b/src/hooks/misc/game_skeleton_update.cpp index 68a02141..8fc7ae69 100644 --- a/src/hooks/misc/game_skeleton_update.cpp +++ b/src/hooks/misc/game_skeleton_update.cpp @@ -8,21 +8,27 @@ namespace big { for (auto mode = skeleton->m_update_modes; mode; mode = mode->m_next) { - if (mode && mode->m_type == type) + if (mode->m_type != type) + continue; + + for (auto group = mode->m_head; group; group = group->m_next) { - for (auto group = mode->m_head; group; group = group->m_next) + if (group->m_hash != "Common Main"_J) { - for (auto item = static_cast(group)->m_head; item; item = item->m_next) - { - if (item->m_hash != 0xA0F39FB6 && item->m_hash != "TamperActions"_J) - { - item->run(); - } - } + group->run(); + continue; } - break; + for (auto item = static_cast(group)->m_head; item; item = item->m_next) + { + if (item->m_hash != 0xA0F39FB6 && item->m_hash != "TamperActions"_J) + { + item->run(); + } + } } + + break; } } } \ No newline at end of file diff --git a/src/hooks/protections/script_event_handler.cpp b/src/hooks/protections/script_event_handler.cpp index b9b3bbb9..64c80a89 100644 --- a/src/hooks/protections/script_event_handler.cpp +++ b/src/hooks/protections/script_event_handler.cpp @@ -375,7 +375,7 @@ namespace big case eRemoteEvent::InteriorControl: { int interior = (int)args[3]; - if (interior < 0 || interior > 176) // the upper bound will change after an update + if (interior < 0 || interior >= static_cast(eSimpleInteriorIndex::SIMPLE_INTERIOR_MAX)) // the upper bound will change after an update { if (auto plyr = g_player_service->get_by_id(player->m_player_id)) session::add_infraction(plyr, Infraction::TRIED_KICK_PLAYER); diff --git a/src/pointers.cpp b/src/pointers.cpp index 92f2ee95..16d44872 100644 --- a/src/pointers.cpp +++ b/src/pointers.cpp @@ -3,7 +3,7 @@ #include "gta_pointers_layout_info.hpp" #include "sc_pointers_layout_info.hpp" -#define GTA_VERSION_TARGET "1.72-3725.0" +#define GTA_VERSION_TARGET "1.72-3751.0" namespace big { diff --git a/src/services/mobile/mobile_service.cpp b/src/services/mobile/mobile_service.cpp index 1126497b..72328717 100644 --- a/src/services/mobile/mobile_service.cpp +++ b/src/services/mobile/mobile_service.cpp @@ -5,7 +5,7 @@ #include "script.hpp" #include "util/mobile.hpp" -#define MAX_GARAGE_NUM 33 +#define MAX_GARAGE_NUM 36 namespace big { @@ -43,8 +43,11 @@ namespace big case 27: return 337; case 28: return 350; case 29: return 363; - case 31: return 515; - case 32: return 537; + case 31: return 515; + case 32: return 537; + case 33: return 547; + case 34: return 567; + case 35: return 587; case MAX_GARAGE_NUM+0: return 156; //Mobile Operations Center case MAX_GARAGE_NUM+1: return 224; //Nightclub B1 case MAX_GARAGE_NUM+2: return 223; //Terrorbyte @@ -61,7 +64,7 @@ namespace big case MAX_GARAGE_NUM+2: //Terrorbyte case MAX_GARAGE_NUM+3: //Kosatka case 14: return 1; - case 31: return 2; + case 31: return 2; case MAX_GARAGE_NUM+1: return 3; //Nightclub B1 case 11: return 8; case 6: @@ -92,6 +95,10 @@ namespace big case 12: case 26: return 20; case 29: return 50; + // mansions + case 33: + case 34: + case 35: return 20; } return -1; } @@ -131,13 +138,16 @@ namespace big case 27: stat = self::char_index ? "MP1_MULTI_PROPERTY_8"_J : "MP0_MULTI_PROPERTY_8"_J; break; case 28: stat = self::char_index ? "MP1_MULTI_PROPERTY_9"_J : "MP0_MULTI_PROPERTY_9"_J; break; case 29: stat = self::char_index ? "MP1_MULTSTOREY_GAR_OWNED"_J : "MP0_MULTSTOREY_GAR_OWNED"_J; break; - case 31: stat = self::char_index ? "MP1_PROP_BAIL_OFFICE"_J : "MP0_PROP_BAIL_OFFICE"_J; break; - case 32: stat = self::char_index ? "MP1_PROP_HACKER_DEN"_J : "MP0_PROP_HACKER_DEN"_J; break; + case 31: stat = self::char_index ? "MP1_PROP_BAIL_OFFICE"_J : "MP0_PROP_BAIL_OFFICE"_J; break; + case 32: stat = self::char_index ? "MP1_PROP_HACKER_DEN"_J : "MP0_PROP_HACKER_DEN"_J; break; + case 33: stat = self::char_index ? "MP1_MANSION_TH_OWNED"_J : "MP0_MANSION_TH_OWNED"_J; break; + case 34: stat = self::char_index ? "MP1_MANSION_AJ_OWNED"_J : "MP0_MANSION_AJ_OWNED"_J; break; + case 35: stat = self::char_index ? "MP1_MANSION_MD_OWNED"_J : "MP0_MANSION_MD_OWNED"_J; break; case MAX_GARAGE_NUM+0: case MAX_GARAGE_NUM+1: case MAX_GARAGE_NUM+2: case MAX_GARAGE_NUM+3: return 1; - default: return -1; + default: return -1; } if (stat == NULL) { @@ -157,7 +167,7 @@ namespace big { case 12: //Hangar { - auto hangar_id = *scr_globals::gpbd_fm_1.at(self::id, 880).at(260).at(304).as(); + auto hangar_id = *scr_globals::gpbd_fm_1.at(self::id, 880).at(260).at(304).as(); switch (hangar_id) { case 1: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("MP_HANGAR_1"); //LSIA Hangar 1 @@ -170,7 +180,7 @@ namespace big } case 13: //Facility { - auto facility_id = *scr_globals::gpbd_fm_1.at(self::id, 880).at(260).at(311).as(); + auto facility_id = *scr_globals::gpbd_fm_1.at(self::id, 880).at(260).at(311).as(); switch (facility_id) { case 1: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("MP_DBASE_1"); //Grand Senora Desert Facility @@ -210,6 +220,9 @@ namespace big } case 31: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("BO_GARNAME"); //Bail Office case 32: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("HD_GARNAME"); //Garment Factory + case 33: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("MG1_GARNAME"); //The Tongva Estate + case 34: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("MG2_GARNAME"); //Richman Villa + case 35: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("MG3_GARNAME"); //The Vinewood Residence case MAX_GARAGE_NUM+0: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("GRTRUCK"); //Mobile Operations Center case MAX_GARAGE_NUM+1: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("MP_BHUB_GAR0"); //Nightclub B1 case MAX_GARAGE_NUM+2: return HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION("MP_BHUB_CLUBT"); //Terrorbyte @@ -249,8 +262,8 @@ namespace big } personal_vehicle::personal_vehicle(int idx, script_global vehicle_idx) : - m_id(idx), - m_vehicle_idx(vehicle_idx) + m_id(idx), + m_vehicle_idx(vehicle_idx) { m_plate = m_vehicle_idx.at(1).as(); m_hash = *m_vehicle_idx.at(66).as(); diff --git a/src/views/network/view_network.cpp b/src/views/network/view_network.cpp index 66f1df7e..91013bdd 100644 --- a/src/views/network/view_network.cpp +++ b/src/views/network/view_network.cpp @@ -62,7 +62,7 @@ namespace big components::button("COPY_SESSION_INFO"_T, [] { char buf[0x100]{}; - g_pointers->m_gta.m_encode_session_info(>a_util::get_network()->m_last_joined_session.m_session_info, buf, 0xA9, nullptr); + g_pointers->m_gta.m_encode_session_info(>a_util::get_network()->m_last_joined_session, buf, 0xA9, nullptr); ImGui::SetClipboardText(buf); });