mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-05 17:13:29 +08:00
feat: unlimited_oxygen & no_water_collision (#547)
This commit is contained in:
parent
3e9444c6b7
commit
70cb7ca162
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
24
BigBaseV2/src/backend/looped/self/no_water_collision.cpp
Normal file
24
BigBaseV2/src/backend/looped/self/no_water_collision.cpp
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
12
BigBaseV2/src/backend/looped/self/unlimited_oxygen.cpp
Normal file
12
BigBaseV2/src/backend/looped/self/unlimited_oxygen.cpp
Normal file
@ -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;
|
||||
}
|
||||
}
|
24
BigBaseV2/src/backend/looped/vehicle/no_water_collision.cpp
Normal file
24
BigBaseV2/src/backend/looped/vehicle/no_water_collision.cpp
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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",
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
|
2
vendor/GTAV-Classes
vendored
2
vendor/GTAV-Classes
vendored
@ -1 +1 @@
|
||||
Subproject commit 37361b421f70cf2a0cce33f2c7d277116474b7cd
|
||||
Subproject commit 09d18c6f6f7f9f8ad67a00f83cdd8379c8a734e3
|
Loading…
x
Reference in New Issue
Block a user