Add more spoofing options and added clang-format (#1020)

* feat(Spoofing): add spoofing
* feat(Spoofing): prepare code for player attach
* remove(PlayerAttach): isn't going to work due to netsync architecture
* fix(GUI): fix scaling
* feat(Project): add clang-format file
* feat(Classes): update classes
* fix(BlackHole): remove unnecessary cleanup
* fix(Formatting): fix formatting for initializer lists
* feat(clang-format): Set tab width and 1 space before comment

Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
This commit is contained in:
maybegreat48
2023-03-01 21:27:15 +00:00
committed by GitHub
parent 6a2cd866c0
commit 9ccb77e8eb
467 changed files with 55742 additions and 36204 deletions

View File

@ -1,8 +1,8 @@
#include "core/data/speed_units.hpp"
#include "fiber_pool.hpp"
#include "util/mobile.hpp"
#include "util/vehicle.hpp"
#include "views/view.hpp"
#include "util/mobile.hpp"
#include "core/data/speed_units.hpp"
namespace big
{
@ -11,8 +11,9 @@ namespace big
components::button("MORS_FIX_ALL"_T, [] {
int amount_fixed = mobile::mors_mutual::fix_all();
g_notification_service->push("MOBILE"_T.data(),
std::vformat("VEHICLE_FIX_AMOUNT"_T.data(), std::make_format_args(amount_fixed, amount_fixed == 1 ? "VEHICLE_FIX_HAS"_T.data() : "VEHICLE_FIX_HAVE"_T.data()))
);
std::vformat("VEHICLE_FIX_AMOUNT"_T.data(),
std::make_format_args(amount_fixed,
amount_fixed == 1 ? "VEHICLE_FIX_HAS"_T.data() : "VEHICLE_FIX_HAVE"_T.data())));
});
ImGui::SameLine();
components::button("REPAIR"_T, [] {
@ -42,21 +43,11 @@ namespace big
ImGui::Separator();
components::button("TURN_ENGINE_ON"_T, [] {
vehicle::set_engine_state(
self::veh,
true,
g.vehicle.change_engine_state_immediately,
g.vehicle.disable_engine_auto_start
);
vehicle::set_engine_state(self::veh, true, g.vehicle.change_engine_state_immediately, g.vehicle.disable_engine_auto_start);
});
ImGui::SameLine();
components::button("TURN_ENGINE_OFF"_T, [] {
vehicle::set_engine_state(
self::veh,
false,
g.vehicle.change_engine_state_immediately,
g.vehicle.disable_engine_auto_start
);
vehicle::set_engine_state(self::veh, false, g.vehicle.change_engine_state_immediately, g.vehicle.disable_engine_auto_start);
});
ImGui::Checkbox("DISABLE_ENGINE_AUTO_START"_T.data(), &g.vehicle.disable_engine_auto_start);
ImGui::SameLine();
@ -109,26 +100,26 @@ namespace big
{
if (ImGui::Button("CHECK_ALL"_T.data()))
{
g.vehicle.proof_bullet = true;
g.vehicle.proof_fire = true;
g.vehicle.proof_bullet = true;
g.vehicle.proof_fire = true;
g.vehicle.proof_collision = true;
g.vehicle.proof_melee = true;
g.vehicle.proof_melee = true;
g.vehicle.proof_explosion = true;
g.vehicle.proof_steam = true;
g.vehicle.proof_water = true;
g.vehicle.proof_steam = true;
g.vehicle.proof_water = true;
}
ImGui::SameLine();
if (ImGui::Button("UNCHECK_ALL"_T.data()))
{
g.vehicle.proof_bullet = false;
g.vehicle.proof_fire = false;
g.vehicle.proof_bullet = false;
g.vehicle.proof_fire = false;
g.vehicle.proof_collision = false;
g.vehicle.proof_melee = false;
g.vehicle.proof_melee = false;
g.vehicle.proof_explosion = false;
g.vehicle.proof_steam = false;
g.vehicle.proof_water = false;
g.vehicle.proof_steam = false;
g.vehicle.proof_water = false;
}
ImGui::BeginGroup();
@ -163,23 +154,11 @@ namespace big
components::sub_title("SPEED_UNIT"_T);
{
ImGui::RadioButton(
speed_unit_strings[(int)SpeedUnit::KMPH].c_str(),
(int*)&g.vehicle.speed_unit,
(int)SpeedUnit::KMPH
);
ImGui::RadioButton(speed_unit_strings[(int)SpeedUnit::KMPH].c_str(), (int*)&g.vehicle.speed_unit, (int)SpeedUnit::KMPH);
ImGui::SameLine();
ImGui::RadioButton(
speed_unit_strings[(int)SpeedUnit::MIPH].c_str(),
(int*)&g.vehicle.speed_unit,
(int)SpeedUnit::MIPH
);
ImGui::RadioButton(speed_unit_strings[(int)SpeedUnit::MIPH].c_str(), (int*)&g.vehicle.speed_unit, (int)SpeedUnit::MIPH);
ImGui::SameLine();
ImGui::RadioButton(
speed_unit_strings[(int)SpeedUnit::MPS].c_str(),
(int*)&g.vehicle.speed_unit,
(int)SpeedUnit::MPS
);
ImGui::RadioButton(speed_unit_strings[(int)SpeedUnit::MPS].c_str(), (int*)&g.vehicle.speed_unit, (int)SpeedUnit::MPS);
}
ImGui::Separator();
@ -191,7 +170,7 @@ namespace big
{
ImGui::Text("POS_X_Y"_T.data());
float pos[2] = { g.vehicle.speedo_meter.x, g.vehicle.speedo_meter.y };
float pos[2] = {g.vehicle.speedo_meter.x, g.vehicle.speedo_meter.y};
if (ImGui::SliderFloat2("###speedo_pos", pos, .001f, .999f, "%.3f"))
{