Weapon impact (#321)

This commit is contained in:
aa15032261
2022-07-06 04:55:18 +08:00
committed by GitHub
parent 10f549183b
commit fa90f775e7
4 changed files with 162 additions and 8 deletions

View File

@ -3,6 +3,7 @@
#include "natives.hpp"
#include "gta/Weapons.h"
#include "core/data/special_ammo_types.hpp"
#include "core/data/bullet_impact_types.hpp"
#include "views/view.hpp"
namespace big
@ -18,6 +19,7 @@ namespace big
ImGui::Checkbox("Enable Special Ammo", &g->weapons.ammo_special.toggle);
eAmmoSpecialType selected_ammo = g->weapons.ammo_special.type;
eImpactType selected_impact = g->weapons.ammo_special.impactType;
if (ImGui::BeginCombo("Special Ammo", SPECIAL_AMMOS[(int)selected_ammo].name))
{
@ -33,6 +35,20 @@ namespace big
ImGui::EndCombo();
}
if (ImGui::BeginCombo("Bullet Impact", BULLET_IMPACTS[selected_impact]))
{
for (const auto& [type, name] : BULLET_IMPACTS)
{
if (ImGui::Selectable(name, type == selected_impact))
g->weapons.ammo_special.impactType = type;
if (type == selected_impact)
ImGui::SetItemDefaultFocus();
}
ImGui::EndCombo();
}
ImGui::Separator();
components::small_text("Misc");