2022-05-04 19:16:40 +02:00
|
|
|
#include "fiber_pool.hpp"
|
|
|
|
#include "util/entity.hpp"
|
2022-07-25 04:56:37 +08:00
|
|
|
#include "util/local_player.hpp"
|
2022-05-04 19:16:40 +02:00
|
|
|
#include "views/view.hpp"
|
2022-11-07 13:23:24 -06:00
|
|
|
#include "core/data/hud_component_names.hpp"
|
2022-12-06 16:12:02 +00:00
|
|
|
#include "util/scripts.hpp"
|
2023-02-01 19:48:31 +01:00
|
|
|
#include "core/data/ptfx_effects.hpp"
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2022-07-12 22:42:07 +08:00
|
|
|
void view::self()
|
|
|
|
{
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_button<"suicide">();
|
2022-06-25 22:03:43 +02:00
|
|
|
ImGui::SameLine();
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_button<"heal">();
|
2022-07-03 03:45:11 +08:00
|
|
|
ImGui::SameLine();
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_button<"fillsnacks">();
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::SameLine();
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_button<"skipcutscene">();
|
2022-10-30 22:23:10 +08:00
|
|
|
ImGui::SameLine();
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_button<"clean">();
|
2022-10-30 22:23:10 +08:00
|
|
|
|
2022-07-19 18:19:19 +08:00
|
|
|
ImGui::Separator();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("GENERAL"_T);
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
ImGui::Checkbox("God Mode", &g.self.god_mode);
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_checkbox<"otr">();
|
|
|
|
components::command_checkbox<"freecam">();
|
|
|
|
components::command_checkbox<"nophone">();
|
|
|
|
components::command_checkbox<"infoxy">();
|
|
|
|
components::command_checkbox<"fastrespawn">();
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
ImGui::EndGroup();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_checkbox<"noclip">();
|
|
|
|
components::command_checkbox<"noragdoll">();
|
|
|
|
components::command_checkbox<"fastrun">();
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("NO_IDLE_KICK"_T.data(), &g.tunables.no_idle_kick);
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_checkbox<"walkunder">();
|
2023-01-08 15:25:15 -05:00
|
|
|
if(!g.self.super_jump)
|
|
|
|
components::command_checkbox<"beastjump">();
|
|
|
|
if(!g.self.beast_jump)
|
|
|
|
components::command_checkbox<"superjump">();
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::EndGroup();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_checkbox<"invis">();
|
|
|
|
if (g.self.invisibility)
|
|
|
|
components::command_checkbox<"localvis">();
|
|
|
|
components::command_checkbox<"cleanloop">();
|
|
|
|
components::command_checkbox<"nocollision">();
|
|
|
|
components::command_checkbox<"mobileradio">();
|
2022-11-11 11:51:40 -06:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("DANCE_MODE"_T.data(), &g.self.dance_mode);
|
2022-12-06 16:12:02 +00:00
|
|
|
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::EndGroup();
|
|
|
|
|
2023-02-01 19:48:31 +01:00
|
|
|
components::sub_title("PTFX Styles");
|
|
|
|
|
|
|
|
components::command_checkbox<"ptfx">();
|
|
|
|
if (g.self.ptfx_effects.show)
|
|
|
|
{
|
|
|
|
ImGui::SliderFloat("PTFX Size", &g.self.ptfx_effects.size, 0.1f, 2.f);
|
|
|
|
if (ImGui::BeginCombo("Asset", ptfx_named[g.self.ptfx_effects.select].friendly_name))
|
|
|
|
{
|
|
|
|
for (int i = 0; i < IM_ARRAYSIZE(ptfx_named); i++)
|
|
|
|
{
|
|
|
|
if (ImGui::Selectable(ptfx_named[i].friendly_name, ptfx_named[i].asset_name == g.self.ptfx_effects.asset))
|
|
|
|
{
|
|
|
|
g.self.ptfx_effects.asset = ptfx_named[i].asset_name; // Update our asset name to be used
|
|
|
|
g.self.ptfx_effects.select = i;
|
|
|
|
g.self.ptfx_effects.effect = ptfx_named[i].effect_names.at(0); // set the effect to the first instance in the vector
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ptfx_named[i].asset_name == g.self.ptfx_effects.asset)
|
|
|
|
ImGui::SetItemDefaultFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::EndCombo();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ImGui::BeginCombo("Effect", g.self.ptfx_effects.effect))
|
|
|
|
{
|
|
|
|
for (const auto& ptfx_type : ptfx_named[g.self.ptfx_effects.select].effect_names)
|
|
|
|
{
|
|
|
|
if (ImGui::Selectable(ptfx_type, ptfx_type == g.self.ptfx_effects.effect))
|
|
|
|
g.self.ptfx_effects.effect = ptfx_type; // Update our ptfx effect
|
|
|
|
|
|
|
|
if (ptfx_type == g.self.ptfx_effects.effect)
|
|
|
|
ImGui::SetItemDefaultFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::EndCombo();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::Separator();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("PROOFS"_T);
|
2022-07-02 23:15:22 +08:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
if (ImGui::Button("CHECK_ALL"_T.data()))
|
2022-07-10 06:33:14 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_bullet = true;
|
|
|
|
g.self.proof_fire = true;
|
|
|
|
g.self.proof_collision = true;
|
|
|
|
g.self.proof_melee = true;
|
|
|
|
g.self.proof_explosion = true;
|
|
|
|
g.self.proof_steam = true;
|
|
|
|
g.self.proof_drown = true;
|
|
|
|
g.self.proof_water = true;
|
2022-07-02 23:15:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
if (ImGui::Button("UNCHECK_ALL"_T.data()))
|
2022-07-10 06:33:14 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_bullet = false;
|
|
|
|
g.self.proof_fire = false;
|
|
|
|
g.self.proof_collision = false;
|
|
|
|
g.self.proof_melee = false;
|
|
|
|
g.self.proof_explosion = false;
|
|
|
|
g.self.proof_steam = false;
|
|
|
|
g.self.proof_drown = false;
|
|
|
|
g.self.proof_water = false;
|
2022-07-02 23:15:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("BULLET"_T.data(), &g.self.proof_bullet);
|
|
|
|
ImGui::Checkbox("FIRE"_T.data(), &g.self.proof_fire);
|
2022-07-02 23:15:22 +08:00
|
|
|
|
|
|
|
ImGui::EndGroup();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("COLLISION"_T.data(), &g.self.proof_collision);
|
|
|
|
ImGui::Checkbox("MELEE"_T.data(), &g.self.proof_melee);
|
2022-07-02 23:15:22 +08:00
|
|
|
|
|
|
|
ImGui::EndGroup();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("EXPLOSION"_T.data(), &g.self.proof_explosion);
|
|
|
|
ImGui::Checkbox("STEAM"_T.data(), &g.self.proof_steam);
|
2022-07-02 23:15:22 +08:00
|
|
|
|
|
|
|
ImGui::EndGroup();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("DROWN"_T.data(), &g.self.proof_drown);
|
|
|
|
ImGui::Checkbox("WATER"_T.data(), &g.self.proof_water);
|
2022-07-02 23:15:22 +08:00
|
|
|
|
|
|
|
ImGui::EndGroup();
|
|
|
|
|
2022-07-12 22:42:07 +08:00
|
|
|
ImGui::Separator();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("POLICE"_T);
|
2022-07-12 22:42:07 +08:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
|
2022-07-12 22:42:07 +08:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
if (!g.self.never_wanted)
|
2022-07-12 22:42:07 +08:00
|
|
|
{
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("FORCE_WANTED_LVL"_T.data(), &g.self.force_wanted_level);
|
|
|
|
ImGui::Text("WANTED_LVL"_T.data());
|
2022-07-12 22:42:07 +08:00
|
|
|
if (
|
2022-12-18 23:15:52 +01:00
|
|
|
ImGui::SliderInt("###wanted_level", &g.self.wanted_level, 0, 5) &&
|
|
|
|
!g.self.force_wanted_level &&
|
2022-07-12 22:42:07 +08:00
|
|
|
g_local_player != nullptr
|
|
|
|
) {
|
2022-12-18 23:15:52 +01:00
|
|
|
g_local_player->m_player_info->m_wanted_level = g.self.wanted_level;
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-07 13:23:24 -06:00
|
|
|
ImGui::Separator();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("HUD"_T);
|
2022-11-07 13:23:24 -06:00
|
|
|
|
|
|
|
ImGui::BeginGroup();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("HIDE_RADAR"_T.data(), &g.self.hide_radar);
|
2022-11-07 13:23:24 -06:00
|
|
|
|
|
|
|
ImGui::SameLine();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("HIDE_AMMO"_T.data(), &g.self.hide_ammo);
|
2022-11-07 13:23:24 -06:00
|
|
|
|
2022-11-26 20:42:58 +01:00
|
|
|
ImGui::SameLine();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("FORCE_SHOW_HUD"_T.data(), &g.self.force_show_hud);
|
2022-11-26 20:42:58 +01:00
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
ImGui::Combo("##hud_comp_combo", &g.self.selected_hud_component, hud_component_names, (int)HudComponents::HUD_WEAPONS);
|
2022-11-07 13:23:24 -06:00
|
|
|
ImGui::SameLine();
|
2023-02-01 19:46:33 +01:00
|
|
|
components::button("HIDE"_T, [] {
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.hud_components_states[g.self.selected_hud_component] = true;
|
2022-11-07 13:23:24 -06:00
|
|
|
});
|
|
|
|
ImGui::SameLine();
|
2023-02-01 19:46:33 +01:00
|
|
|
components::button("SHOW"_T, [] {
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.hud_components_states[g.self.selected_hud_component] = false;
|
2022-11-07 13:23:24 -06:00
|
|
|
});
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::button("HIDE_ALL"_T, [] {
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.hide_radar = true;
|
|
|
|
g.self.hide_ammo = true;
|
2022-11-07 13:23:24 -06:00
|
|
|
for (int i = 0; i < (int)HudComponents::HUD_WEAPONS; i++)
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.hud_components_states[i] = true;
|
2022-11-07 13:23:24 -06:00
|
|
|
}
|
|
|
|
});
|
|
|
|
ImGui::SameLine();
|
2023-02-01 19:46:33 +01:00
|
|
|
components::button("SHOW_ALL"_T, [] {
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.hide_radar = false;
|
|
|
|
g.self.hide_ammo = false;
|
2022-11-07 13:23:24 -06:00
|
|
|
for (int i = 0; i < (int)HudComponents::HUD_WEAPONS; i++)
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.hud_components_states[i] = false;
|
2022-11-07 13:23:24 -06:00
|
|
|
}
|
|
|
|
});
|
2022-11-26 20:42:58 +01:00
|
|
|
ImGui::SameLine();
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("FORCE_SHOW_HUD_ELEMENT"_T.data(), &g.self.force_show_hud_element);
|
2022-11-26 20:42:58 +01:00
|
|
|
if (ImGui::IsItemHovered())
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::SetTooltip("FORCE_SHOW_HUD_ELEMENT_DESC"_T.data());
|
2022-11-07 13:23:24 -06:00
|
|
|
|
|
|
|
ImGui::EndGroup();
|
|
|
|
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask = 0;
|
|
|
|
if (g.self.god_mode)
|
2022-07-10 06:33:14 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::GOD);
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.proof_bullet)
|
2022-07-10 06:33:14 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::BULLET);
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.proof_fire)
|
2022-07-12 22:42:07 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::FIRE);
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.proof_collision)
|
2022-07-12 22:42:07 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::COLLISION);
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.proof_melee)
|
2022-07-12 22:42:07 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::MELEE);
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.proof_explosion)
|
2022-07-12 22:42:07 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::EXPLOSION);
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.proof_steam)
|
2022-07-12 22:42:07 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::STEAM);
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.proof_drown)
|
2022-07-12 22:42:07 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::DROWN);
|
2022-07-12 22:42:07 +08:00
|
|
|
}
|
2022-12-18 23:15:52 +01:00
|
|
|
if (g.self.proof_water)
|
2022-07-12 22:42:07 +08:00
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.self.proof_mask |= static_cast<int>(eEntityProofs::WATER);
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
|
|
|
}
|
2022-06-25 22:03:43 +02:00
|
|
|
}
|