Вопрос 1 ошибка pls [LW hitchams]

С++
Начинающий
Статус
Оффлайн
Регистрация
18 Янв 2021
Сообщения
88
Реакции[?]
8
Поинты[?]
0
1618424272603.png
1618424285459.png

Код:

Код:
void hit_chams::add_matrix(player_t* player, matrix3x4_t* bones)
{
    auto& hit = m_Hitmatrix.emplace_back();

    std::memcpy(hit.pBoneToWorld, bones, player->m_CachedBoneData().Count() * sizeof(matrix3x4_t));
    hit.time = m_globals()->m_realtime + 2.5f;

    static int m_nSkin = util::find_in_datamap(player->GetPredDescMap(), crypt_str("m_nSkin"));
    static int m_nBody = util::find_in_datamap(player->GetPredDescMap(), crypt_str("m_nBody"));

    hit.info.origin = player->GetAbsOrigin();
    hit.info.angles = player->GetAbsAngles();

    auto renderable = player->GetClientRenderable();

    if (!renderable)
        return;

    auto model = player->GetModel();

    if (!model)
        return;

    auto hdr = *(studiohdr_t**)(player->m_pStudioHdr());

    if (!hdr)
        return;

    hit.state.m_pStudioHdr = hdr;
    hit.state.m_pStudioHWData = m_modelcache()->GetHardwareData(model->studio);
    hit.state.m_pRenderable = renderable;
    hit.state.m_drawFlags = 0;

    hit.info.pRenderable = renderable;
    hit.info.pModel = model;
    hit.info.pLightingOffset = nullptr;
    hit.info.pLightingOrigin = nullptr;
    hit.info.hitboxset = player->m_nHitboxSet();
    hit.info.skin = (int)(uintptr_t(player) + m_nSkin);
    hit.info.body = (int)(uintptr_t(player) + m_nBody);
    hit.info.entity_index = player->EntIndex();
    hit.info.instance = call_virtual<ModelInstanceHandle_t(__thiscall*)(void*) >(renderable, 30u)(renderable);
    hit.info.flags = 0x1;

    hit.info.pModelToWorld = &hit.model_to_world;
    hit.state.m_pModelToWorld = &hit.model_to_world;

    hit.model_to_world.AngleMatrix(hit.info.angles, hit.info.origin);
}
 
Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2019
Сообщения
137
Реакции[?]
77
Поинты[?]
2K
C++:
struct model_t
{
    void* fnHandle;
    char name[260];
    __int32 nLoadFlags;
    __int32 nServerCount;
    __int32 type;
    __int32 flags;
    Vector mins, maxs;
    float radius;
    void* m_pKeyValues;
    union
    {
        void* brush;
        MDLHandle_t studio;
        void* sprite;
    };
};
изменить структуры в studio.hpp
 
С++
Начинающий
Статус
Оффлайн
Регистрация
18 Янв 2021
Сообщения
88
Реакции[?]
8
Поинты[?]
0
C++:
struct model_t
{
    void* fnHandle;
    char name[260];
    __int32 nLoadFlags;
    __int32 nServerCount;
    __int32 type;
    __int32 flags;
    Vector mins, maxs;
    float radius;
    void* m_pKeyValues;
    union
    {
        void* brush;
        MDLHandle_t studio;
        void* sprite;
    };
};
изменить структуры в studio.hpp
Шяс проверю огромное спасибо
 
Сверху Снизу