3 вектора 9 матриц
3 матрицы на 1 вектор
если все 3 вектора проходят через все матрицы
сейф поинт
выстрел
не мисснул
тебя бекшутнули.
для примера десинк вип:
bool c_aimbot::safe_point(C_BasePlayer* entity, Vector eye_pos, Vector aim_point, int hitboxIdx, bool shot)
{
if (shot)
return true;
auto resolve_info = &cheat::features::aaa.player_resolver_records[entity->entindex() - 1];
const auto cfg = get_weapon_conf();
if (!cfg.has_value())
return true;
auto baimkey_shit = (cfg->body_aim_key_enable && keys::bodyaim);
auto can_safepoint = (resolve_info->did_shot_this_tick && cfg->typecpointscale == 1) || cfg->typecpointscale == 2;
if ((cfg->safeonbaim && !keys::bodyaim) || !can_safepoint)
return true;
const auto angle = Math::CalcAngle(eye_pos, aim_point);
Vector forward;
Math::AngleVectors(angle, &forward);
auto end = eye_pos + forward * 8092.f;
auto cur_rec = &cheat::features::lagcomp.records[entity->entindex() - 1].m_Current;
if (!cur_rec->data_filled)
return false;
C_Hitbox box1; get_hitbox_data(&box1, entity, hitboxIdx, cur_rec->leftmatrixes);
C_Hitbox box2; get_hitbox_data(&box2, entity, hitboxIdx, cur_rec->rightmatrixes);
C_Hitbox box3; get_hitbox_data(&box3, entity, hitboxIdx, cur_rec->matrixes);
auto pizdets = box1.isOBB || box2.isOBB || box3.isOBB;
if (pizdets) {
Math::VectorITransform(eye_pos, cur_rec->leftmatrixes[box1.bone], box1.mins);
Math::VectorIRotate(end, cur_rec->leftmatrixes[box1.bone], box1.maxs);
Math::VectorITransform(eye_pos, cur_rec->rightmatrixes[box2.bone], box2.mins);
Math::VectorIRotate(end, cur_rec->rightmatrixes[box2.bone], box2.maxs);
Math::VectorITransform(eye_pos, cur_rec->matrixes[box3.bone], box3.mins);
Math::VectorIRotate(end, cur_rec->matrixes[box3.bone], box3.maxs);
}
auto hits = 0;
if (pizdets ? Math::IntersectBB(eye_pos, end, box1.mins, box1.maxs) : Math::Intersect(eye_pos, end, box1.mins, box1.maxs, box1.radius))
++hits;
if (pizdets ? Math::IntersectBB(eye_pos, end, box2.mins, box2.maxs) : Math::Intersect(eye_pos, end, box2.mins, box2.maxs, box2.radius))
++hits;
if (pizdets ? Math::IntersectBB(eye_pos, end, box3.mins, box3.maxs) : Math::Intersect(eye_pos, end, box3.mins, box3.maxs, box3.radius))
++hits;
return (hits >= 3);
}