ЧВК EB_LAN
-
Автор темы
- #1
Я делал эти мульты чтоб чит лишний раз по ним не срал.
Мульты вполне нормальные если их проверять и не выходят за рамки хитбокса.
Мульты вполне нормальные если их проверять и не выходят за рамки хитбокса.
C++:
std::vector <scan_point> aim::get_points(adjust_data* record, int hitbox, bool from_aim)
{
std::vector <scan_point> points; //-V827
auto model = record->player->GetModel();
if (!model)
return points;
auto hdr = m_modelinfo()->GetStudioModel(model);
if (!hdr)
return points;
auto set = hdr->pHitboxSet(record->player->m_nHitboxSet());
if (!set)
return points;
auto bbox = set->pHitbox(hitbox);
if (!bbox)
return points;
auto g_VecMax = bbox->bbmax;
auto g_VecMin = bbox->bbmin;
auto g_VecCenter = (bbox->bbmin + bbox->bbmax) / 2.f;
bool g_StaticPointScale = g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].static_point_scale;
if (bbox->radius <= .0f)
{
auto rotation_matrix = math::angle_matrix(bbox->rotation);
matrix3x4_t matrix;
math::concat_transforms(record->matrixes_data.main[bbox->bone], rotation_matrix, matrix);
auto origin = matrix.GetOrigin();
if (hitbox == HITBOX_UPPER_CHEST || hitbox == HITBOX_RIGHT_THIGH || HITBOX_LOWER_CHEST || hitbox == HITBOX_CHEST || hitbox == HITBOX_LEFT_THIGH)
{
const auto v105 = (g_VecMax.x + g_VecMin.x) * .5f;
const auto v106 = (g_VecMax.y + g_VecMin.y) * .5f;
const auto v107 = g_VecMax.x - v105;
const auto v108 = (g_VecMax.z + g_VecMin.z) * .5f;
points.emplace_back(scan_point(Vector(.0f, v106, .0f), hitbox, false));
points.emplace_back(scan_point(Vector(.0f, .0f, v108), hitbox, false));
points.emplace_back(scan_point(Vector(v107 * .45f + v105, .0f, .0f), hitbox, false));
}
}
else
{
auto g_HeadScale = .0f;
auto g_BodyScale = .0f;
if (g_StaticPointScale)
{
if (hitbox == HITBOX_HEAD)
g_HeadScale = math::clamp(g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].head_scale, .0f, .70f);
else if (hitbox == HITBOX_UPPER_CHEST || hitbox == HITBOX_RIGHT_THIGH || HITBOX_LOWER_CHEST || hitbox == HITBOX_CHEST || hitbox == HITBOX_LEFT_THIGH || hitbox == HITBOX_RIGHT_UPPER_ARM || hitbox == HITBOX_LEFT_UPPER_ARM || hitbox == HITBOX_PELVIS)
g_BodyScale = math::clamp(g_cfg.ragebot.weapon[g_ctx.globals.current_weapon].body_scale, .0f, .65f);
}
if (!g_StaticPointScale)
{
auto transformed_center = g_VecCenter;
math::vector_transform(transformed_center, record->matrixes_data.main[bbox->bone], transformed_center);
auto g_Accuracy = g_ctx.globals.spread + g_ctx.globals.inaccuracy;
auto g_Distance = transformed_center.DistTo(g_ctx.globals.eye_pos);
g_Distance /= math::fast_sin(DEG2RAD(90.f - RAD2DEG(g_Accuracy)));
g_Accuracy = math::fast_sin(g_Accuracy);
auto g_HitboxRadius = max(bbox->radius - g_Distance * g_Accuracy, .0f);
g_HeadScale = math::clamp(g_HitboxRadius / bbox->radius, .0f, .70f);
g_BodyScale = math::clamp(g_HitboxRadius / bbox->radius, .0f, .65f);
}
if ((g_HeadScale || g_BodyScale) <= .0f) //-V648
{
math::vector_transform(g_VecCenter, record->matrixes_data.main[bbox->bone], g_VecCenter);
points.emplace_back(scan_point(g_VecCenter, hitbox, true));
return points;
}
auto g_HeadRadius = bbox->radius * g_HeadScale;
auto g_BodyRadius = bbox->radius * g_BodyScale;
if (hitbox == HITBOX_HEAD)
{
auto pitch_down = math::normalize_pitch(record->angles.x) > 85.f;
auto backward = fabs(math::normalize_yaw(record->angles.y - math::calculate_angle(record->player->get_shoot_position(), g_ctx.local()->GetAbsOrigin()).y)) > 120.f;
//Center points.
points.emplace_back(scan_point(g_VecCenter, hitbox, !pitch_down || !backward));
points.emplace_back(scan_point(Vector(bbox->bbmax.x + 0.70710678f * g_HeadRadius, bbox->bbmax.y - 0.70710678f * g_HeadRadius, bbox->bbmax.z), hitbox, false));
//Points scale.
points.emplace_back(scan_point(Vector(bbox->bbmax.x, bbox->bbmax.y, bbox->bbmax.z + g_HeadRadius), hitbox, false));
points.emplace_back(scan_point(Vector(bbox->bbmax.x, bbox->bbmax.y, bbox->bbmax.z - g_HeadRadius), hitbox, false));
points.emplace_back(scan_point(Vector(bbox->bbmax.x, bbox->bbmax.y - g_HeadRadius, bbox->bbmax.z), hitbox, false));
if (pitch_down && backward)
points.emplace_back(scan_point(Vector(bbox->bbmax.x - g_HeadRadius, bbox->bbmax.y, bbox->bbmax.z), hitbox, false));
}
else if (hitbox == HITBOX_STOMACH)
{
//Center points.
points.emplace_back(scan_point(g_VecCenter, hitbox, true));
//Points scale.
points.emplace_back(scan_point(Vector(g_VecCenter.x, g_VecCenter.y, g_VecMin.z + g_BodyRadius), hitbox, false));
points.emplace_back(scan_point(Vector(g_VecCenter.x, g_VecCenter.y, g_VecMax.z - g_BodyRadius), hitbox, false));
//Backward point.
points.emplace_back(scan_point(Vector{ g_VecCenter.x, g_VecMax.y - g_BodyRadius, g_VecCenter.z }, hitbox, true));
}
else if (hitbox == HITBOX_PELVIS || hitbox == HITBOX_UPPER_CHEST)
{
//Center points.
points.emplace_back(scan_point(g_VecCenter, hitbox, true));
//Points scale.
points.emplace_back(scan_point(Vector(g_VecCenter.x, g_VecCenter.y, g_VecMax.z + g_BodyRadius), hitbox, false));
points.emplace_back(scan_point(Vector(g_VecCenter.x, g_VecCenter.y, g_VecMin.z - g_BodyRadius), hitbox, false));
}
else if (hitbox == HITBOX_LOWER_CHEST || hitbox == HITBOX_CHEST)
{
//Center points.
points.emplace_back(scan_point(g_VecCenter, hitbox, true));
//Points scale.
points.emplace_back(scan_point(Vector(g_VecCenter.x, g_VecCenter.y, g_VecMax.z + g_BodyRadius), hitbox, false));
points.emplace_back(scan_point(Vector(g_VecCenter.x, g_VecCenter.y, g_VecMin.z - g_BodyRadius), hitbox, false));
//Backward point.
points.emplace_back(scan_point(Vector{ g_VecCenter.x, g_VecMax.y - g_BodyRadius, g_VecCenter.z }, hitbox, false));
}
else if (hitbox == HITBOX_RIGHT_THIGH || hitbox == HITBOX_LEFT_THIGH)
{
//Center point.
points.emplace_back(scan_point(g_VecCenter, hitbox, true));
}
else if (hitbox == HITBOX_RIGHT_UPPER_ARM || hitbox == HITBOX_LEFT_UPPER_ARM)
{
//Center point.
points.emplace_back(scan_point(g_VecCenter, hitbox, true));
}
}
for (auto& point : points)
math::vector_transform(point.point, record->matrixes_data.main[bbox->bone], point.point);
return points;
}