diff --git a/BigBaseV2/src/backend/backend.cpp b/BigBaseV2/src/backend/backend.cpp index cbe03ee0..621b99d2 100644 --- a/BigBaseV2/src/backend/backend.cpp +++ b/BigBaseV2/src/backend/backend.cpp @@ -33,6 +33,8 @@ namespace big looped::self_police(); looped::self_super_run(); looped::self_no_collision(); + looped::self_unlimited_oxygen(); + looped::self_no_water_collision(); script::get_current()->yield(); } @@ -80,6 +82,7 @@ namespace big looped::vehicle_seatbelt(); looped::vehicle_speedo_meter(); looped::vehicle_keep_vehicle_repaired(); + looped::vehicle_no_water_collision(); script::get_current()->yield(); } diff --git a/BigBaseV2/src/backend/looped/looped.hpp b/BigBaseV2/src/backend/looped/looped.hpp index bdf6093e..647d423e 100644 --- a/BigBaseV2/src/backend/looped/looped.hpp +++ b/BigBaseV2/src/backend/looped/looped.hpp @@ -33,6 +33,8 @@ namespace big static void self_police(); static void self_super_run(); static void self_no_collision(); + static void self_unlimited_oxygen(); + static void self_no_water_collision(); static void session_local_time(); @@ -56,6 +58,7 @@ namespace big static void vehicle_speedo_meter(); static void vehicle_turn_signals(); static void vehicle_keep_vehicle_repaired(); + static void vehicle_no_water_collision(); static void weapons_ammo_special_type(); static void weapons_cage_gun(); diff --git a/BigBaseV2/src/backend/looped/self/no_water_collision.cpp b/BigBaseV2/src/backend/looped/self/no_water_collision.cpp new file mode 100644 index 00000000..3bcb84e2 --- /dev/null +++ b/BigBaseV2/src/backend/looped/self/no_water_collision.cpp @@ -0,0 +1,24 @@ +#include "backend/looped/looped.hpp" + +namespace big +{ + static bool bLastSelfNoWaterCollsion = false; + + void looped::self_no_water_collision() + { + if (g_local_player == nullptr) return; + + bool bNoWaterCollsion = g->self.no_water_collision; + + if (bNoWaterCollsion) + { + g_local_player->m_navigation->m_damp->m_water_collision = 0; + bLastSelfNoWaterCollsion = bNoWaterCollsion; + } + else if (bNoWaterCollsion != bLastSelfNoWaterCollsion) + { + g_local_player->m_navigation->m_damp->m_water_collision = 1; + bLastSelfNoWaterCollsion = bNoWaterCollsion; + } + } +} \ No newline at end of file diff --git a/BigBaseV2/src/backend/looped/self/unlimited_oxygen.cpp b/BigBaseV2/src/backend/looped/self/unlimited_oxygen.cpp new file mode 100644 index 00000000..6ad56728 --- /dev/null +++ b/BigBaseV2/src/backend/looped/self/unlimited_oxygen.cpp @@ -0,0 +1,12 @@ +#include "backend/looped/looped.hpp" + +namespace big +{ + void looped::self_unlimited_oxygen() + { + if (g_local_player == nullptr) return; + + if (g->self.unlimited_oxygen) + g_local_player->m_oxygen_info->m_oxygen_time = 0; + } +} \ No newline at end of file diff --git a/BigBaseV2/src/backend/looped/vehicle/no_water_collision.cpp b/BigBaseV2/src/backend/looped/vehicle/no_water_collision.cpp new file mode 100644 index 00000000..3c7112ea --- /dev/null +++ b/BigBaseV2/src/backend/looped/vehicle/no_water_collision.cpp @@ -0,0 +1,24 @@ +#include "backend/looped/looped.hpp" + +namespace big +{ + static bool bLastVehicleNoWaterCollsion = false; + + void looped::vehicle_no_water_collision() + { + if (g_local_player == nullptr || g_local_player->m_vehicle == nullptr) return; + + bool bNoWaterCollsion = g->vehicle.no_water_collision; + + if (bNoWaterCollsion) + { + g_local_player->m_vehicle->m_navigation->m_damp->m_water_collision = 0; + bLastVehicleNoWaterCollsion = bNoWaterCollsion; + } + else if (bNoWaterCollsion != bLastVehicleNoWaterCollsion) + { + g_local_player->m_vehicle->m_navigation->m_damp->m_water_collision = 1; + bLastVehicleNoWaterCollsion = bNoWaterCollsion; + } + } +} \ No newline at end of file diff --git a/BigBaseV2/src/core/globals.hpp b/BigBaseV2/src/core/globals.hpp index c4fd82cd..a0382330 100644 --- a/BigBaseV2/src/core/globals.hpp +++ b/BigBaseV2/src/core/globals.hpp @@ -152,6 +152,8 @@ namespace big bool off_radar = false; bool super_run = false; bool no_collision = false; + bool unlimited_oxygen = false; + bool no_water_collision = false; int wanted_level = 0; bool god_mode = false; bool proof_bullet = false; @@ -291,6 +293,7 @@ namespace big bool turn_signals = false; bool vehicle_jump = false; bool keep_vehicle_repaired = false; + bool no_water_collision = false; speedo_meter speedo_meter{}; rainbow_paint rainbow_paint{}; fly fly{}; @@ -560,6 +563,8 @@ namespace big this->self.off_radar = j["self"]["off_radar"]; this->self.super_run = j["self"]["super_run"]; this->self.no_collision = j["self"]["no_collision"]; + this->self.unlimited_oxygen = j["self"]["unlimited_oxygen"]; + this->self.no_water_collision = j["self"]["no_water_collision"]; this->settings.dev_dlc = j["settings"]["dev_dlc"]; this->settings.hotkeys.menu_toggle = j["settings"]["hotkeys"]["menu_toggle"]; @@ -616,6 +621,7 @@ namespace big this->vehicle.is_targetable = j["vehicle"]["is_targetable"]; this->vehicle.seatbelt = j["vehicle"]["seatbelt"]; this->vehicle.turn_signals = j["vehicle"]["turn_signals"]; + this->vehicle.no_water_collision = j["vehicle"]["no_water_collision"]; this->vehicle.speedo_meter.enabled = j["vehicle"]["speedo_meter"]["enabled"]; this->vehicle.speedo_meter.left_side = j["vehicle"]["speedo_meter"]["left_side"]; @@ -827,6 +833,8 @@ namespace big { "off_radar", this->self.off_radar }, { "super_run", this->self.super_run }, { "no_collision", this->self.no_collision }, + { "unlimited_oxygen", this->self.unlimited_oxygen }, + { "no_water_collision", this->self.no_water_collision }, } }, { @@ -907,6 +915,7 @@ namespace big { "is_targetable", this->vehicle.is_targetable }, { "turn_signals", this->vehicle.turn_signals }, { "seatbelt", this->vehicle.seatbelt }, + { "no_water_collision", this->vehicle.no_water_collision }, { "speedo_meter", { diff --git a/BigBaseV2/src/hooks/protections/received_clone_sync.cpp b/BigBaseV2/src/hooks/protections/received_clone_sync.cpp index 71b6e912..80649627 100644 --- a/BigBaseV2/src/hooks/protections/received_clone_sync.cpp +++ b/BigBaseV2/src/hooks/protections/received_clone_sync.cpp @@ -49,7 +49,7 @@ namespace big { if (auto model_info = game_obj->m_model_info) { - const auto model = model_info::get_model(model_info->m_model_hash); + const auto model = model_info::get_model(model_info->m_hash); if (!model || model_info->m_model_type != model->m_model_type) { return SyncResponse::WrongOwner; diff --git a/BigBaseV2/src/views/self/view_self.cpp b/BigBaseV2/src/views/self/view_self.cpp index 8fa1d017..a505fc88 100644 --- a/BigBaseV2/src/views/self/view_self.cpp +++ b/BigBaseV2/src/views/self/view_self.cpp @@ -54,6 +54,7 @@ namespace big ImGui::Checkbox("Off Radar", &g->self.off_radar); ImGui::Checkbox("Free Cam", &g->self.free_cam); ImGui::Checkbox("Disable Phone", &g->tunables.disable_phone); + ImGui::Checkbox("Unlimited Oxygen", &g->self.unlimited_oxygen); ImGui::EndGroup(); ImGui::SameLine(); @@ -63,6 +64,7 @@ namespace big ImGui::Checkbox("No Ragdoll", &g->self.no_ragdoll); ImGui::Checkbox("Super Run", &g->self.super_run); ImGui::Checkbox("No Idle Kick", &g->tunables.no_idle_kick); + ImGui::Checkbox("No Water Collision", &g->self.no_water_collision); ImGui::EndGroup(); ImGui::SameLine(); diff --git a/BigBaseV2/src/views/vehicle/view_vehicle.cpp b/BigBaseV2/src/views/vehicle/view_vehicle.cpp index 693041e0..82fe8888 100644 --- a/BigBaseV2/src/views/vehicle/view_vehicle.cpp +++ b/BigBaseV2/src/views/vehicle/view_vehicle.cpp @@ -66,6 +66,7 @@ namespace big { ImGui::Checkbox("Fully Automatic Signal", &g->vehicle.auto_turn_signals); } + ImGui::Checkbox("No Water Collision", &g->vehicle.no_water_collision); ImGui::EndGroup(); } diff --git a/vendor/GTAV-Classes b/vendor/GTAV-Classes index 37361b42..09d18c6f 160000 --- a/vendor/GTAV-Classes +++ b/vendor/GTAV-Classes @@ -1 +1 @@ -Subproject commit 37361b421f70cf2a0cce33f2c7d277116474b7cd +Subproject commit 09d18c6f6f7f9f8ad67a00f83cdd8379c8a734e3