From 23fc8f6f0bcd7d23309c4b9469beefc8aa90d5aa Mon Sep 17 00:00:00 2001 From: rei-2 <174158077+rei-2@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:04:44 -0400 Subject: [PATCH] separate colors for bone hitboxes (hitscan, melee) and bound hitboxes (projectile) --- .../src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp | 4 ++-- Amalgam/src/Features/ImGui/Menu/Menu.cpp | 3 ++- Amalgam/src/Features/Visuals/Visuals.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp b/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp index 14b2e022..a3e098f5 100644 --- a/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp +++ b/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp @@ -776,11 +776,11 @@ int CAimbotProjectile::CanHit(Target_t& target, CTFPlayer* pLocal, CTFWeaponBase target.m_vAngleTo = vAngleTo; if (Vars::Visuals::Hitbox::ShowHitboxes.Value) { - pBoxes->push_back({ vPredicted, target.m_pEntity->m_vecMins(), target.m_pEntity->m_vecMaxs(), Vec3(), I::GlobalVars->curtime + (Vars::Visuals::Simulation::Timed.Value ? flTime : 5.f), Vars::Colors::HitboxEdge.Value, Vars::Colors::HitboxFace.Value, true }); + pBoxes->push_back({ vPredicted, target.m_pEntity->m_vecMins(), target.m_pEntity->m_vecMaxs(), Vec3(), I::GlobalVars->curtime + (Vars::Visuals::Simulation::Timed.Value ? flTime : 5.f), Vars::Colors::BoundHitboxEdge.Value, Vars::Colors::BoundHitboxFace.Value, true }); const float flSize = std::clamp(projInfo.m_vHull.x, 1.f, 3.f); const Vec3 vSize = { flSize, flSize, flSize }; - pBoxes->push_back({ vTarget, vSize * -1, vSize, Vec3(), I::GlobalVars->curtime + (Vars::Visuals::Simulation::Timed.Value ? flTime : 5.f), Vars::Colors::HitboxEdge.Value, Vars::Colors::HitboxFace.Value, true }); + pBoxes->push_back({ vTarget, vSize * -1, vSize, Vec3(), I::GlobalVars->curtime + (Vars::Visuals::Simulation::Timed.Value ? flTime : 5.f), Vars::Colors::BoundHitboxEdge.Value, Vars::Colors::BoundHitboxFace.Value, true }); if (Vars::Debug::Info.Value && target.m_nAimedHitbox == HITBOX_HEAD) // huntsman head { diff --git a/Amalgam/src/Features/ImGui/Menu/Menu.cpp b/Amalgam/src/Features/ImGui/Menu/Menu.cpp index a04fe5db..1ca28292 100644 --- a/Amalgam/src/Features/ImGui/Menu/Menu.cpp +++ b/Amalgam/src/Features/ImGui/Menu/Menu.cpp @@ -745,7 +745,8 @@ void CMenu::MenuVisuals() } if (Section("Hitbox")) { - FColorPicker("Edge color", Vars::Colors::HitboxEdge, 1); FColorPicker("Face color", Vars::Colors::HitboxFace); + FColorPicker("Bound edge color", Vars::Colors::BoundHitboxEdge, 1); FColorPicker("Bound face color", Vars::Colors::BoundHitboxFace); + FColorPicker("Bone edge color", Vars::Colors::BoneHitboxEdge, 4); FColorPicker("Bone face color", Vars::Colors::BoneHitboxFace, 3); FToggle("Draw Hitboxes", Vars::Visuals::Hitbox::ShowHitboxes); } EndSection(); if (Section("Thirdperson")) diff --git a/Amalgam/src/Features/Visuals/Visuals.cpp b/Amalgam/src/Features/Visuals/Visuals.cpp index 49387a3b..e463e970 100644 --- a/Amalgam/src/Features/Visuals/Visuals.cpp +++ b/Amalgam/src/Features/Visuals/Visuals.cpp @@ -508,7 +508,7 @@ std::vector CVisuals::GetHitboxes(matrix3x4 aBones[MAXSTUDIOBONES], CBa Vec3 vAngle; Math::MatrixAngles(matrix, vAngle); Vec3 vOrigin; Math::GetMatrixOrigin(matrix, vOrigin); - vBoxes.push_back({ vOrigin, pBox->bbmin, pBox->bbmax, vAngle, I::GlobalVars->curtime + 5.f, Vars::Colors::HitboxEdge.Value, Vars::Colors::HitboxFace.Value, true }); + vBoxes.push_back({ vOrigin, pBox->bbmin, pBox->bbmax, vAngle, I::GlobalVars->curtime + 5.f, Vars::Colors::BoneHitboxEdge.Value, Vars::Colors::BoneHitboxFace.Value, true }); } return vBoxes;