mirror of
https://github.com/rei-2/Amalgam
synced 2026-10-10 21:03:09 +08:00
separate colors for bone hitboxes (hitscan, melee) and bound hitboxes (projectile)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -508,7 +508,7 @@ std::vector<DrawBox> 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;
|
||||
|
||||
Reference in New Issue
Block a user