Вопрос Visualize Ragebot [From Skeet]

Начинающий
Статус
Оффлайн
Регистрация
23 Янв 2022
Сообщения
4
Реакции[?]
0
Поинты[?]
0
So im making a skeet.idb paste for legacy csgo and im trying to implement the visualize ragebot from skeet [Renders the possible hitbox that the cheat is going to shoot in other color] and i have no idea on how to achieve this, if someone could explain to me how to do that i would rlly appreciate it.

ps. If any of yall do explain please explain it to me like i was 5 years old, i have very few knowledge on gamehacking and cpp
Thanks
 
Забаненный
Статус
Оффлайн
Регистрация
2 Дек 2020
Сообщения
34
Реакции[?]
8
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
void Visuals::DrawHitboxMatrix( LagRecord* record, Color col, float time ) {
    const model_t* model;
    studiohdr_t* hdr;
    mstudiohitboxset_t* set;
    mstudiobbox_t* bbox;
    vec3_t             mins, maxs, origin;
    ang_t               angle;

    model = record->m_player->GetModel( );
    if( !model )
        return;

    hdr = g_csgo.m_model_info->GetStudioModel( model );
    if( !hdr )
        return;

    set = hdr->GetHitboxSet( record->m_player->m_nHitboxSet( ) );
    if( !set )
        return;

    for( int i{ }; i < set->m_hitboxes; ++i ) {
        bbox = set->GetHitbox( i );
        if( !bbox )
            continue;

        // bbox.
        if( bbox->m_radius <= 0.f ) {
            // https://developer.valvesoftware.com/wiki/Rotation_Tutorial

            // convert rotation angle to a matrix.
            matrix3x4_t rot_matrix;
            g_csgo.AngleMatrix( bbox->m_angle, rot_matrix );

            // apply the rotation to the entity input space (local).
            matrix3x4_t matrix;
            math::ConcatTransforms( record->m_bones[ bbox->m_bone ], rot_matrix, matrix );

            // extract the compound rotation as an angle.
            ang_t bbox_angle;
            math::MatrixAngles( matrix, bbox_angle );

            // extract hitbox origin.
            vec3_t origin = matrix.GetOrigin( );

            // draw box.
            g_csgo.m_debug_overlay->AddBoxOverlay( origin, bbox->m_mins, bbox->m_maxs, bbox_angle, col.r( ), col.g( ), col.b( ), 0, time );
        }

        // capsule.
        else {
            // NOTE; the angle for capsules is always 0.f, 0.f, 0.f.

            // create a rotation matrix.
            matrix3x4_t matrix;
            g_csgo.AngleMatrix( bbox->m_angle, matrix );

            // apply the rotation matrix to the entity output space (world).
            math::ConcatTransforms( record->m_bones[ bbox->m_bone ], matrix, matrix );

            // get world positions from new matrix.
            math::VectorTransform( bbox->m_mins, matrix, mins );
            math::VectorTransform( bbox->m_maxs, matrix, maxs );

            g_csgo.m_debug_overlay->AddCapsuleOverlay( mins, maxs, bbox->m_radius, col.r( ), col.g( ), col.b( ), col.a( ), time, 0, 0 );
        }
    }
}
exampe to call.

C++:
if ( attack ) {
    if ( target ) {
        g_visuals.DrawHitboxMatrix( record, col_t::white, 10.f );
    }
}
 
Сверху Снизу