Вопрос Проблема с Velocity graph

life is cheap, death is free!
Эксперт
Статус
Оффлайн
Регистрация
9 Дек 2019
Сообщения
1,602
Реакции[?]
513
Поинты[?]
2K
Дикие проблемы с анимками ножа
Скоро приложу видос
Использую сурс:
Пожалуйста, авторизуйтесь для просмотра ссылки.
 
life is cheap, death is free!
Эксперт
Статус
Оффлайн
Регистрация
9 Дек 2019
Сообщения
1,602
Реакции[?]
513
Поинты[?]
2K
у тебя в сурсе нету фикса анимок.
да вроде как присутствует

C++:
enum ESequence
{
    SEQUENCE_DEFAULT_DRAW = 0,
    SEQUENCE_DEFAULT_IDLE1 = 1,
    SEQUENCE_DEFAULT_IDLE2 = 2,
    SEQUENCE_DEFAULT_LIGHT_MISS1 = 3,
    SEQUENCE_DEFAULT_LIGHT_MISS2 = 4,
    SEQUENCE_DEFAULT_HEAVY_MISS1 = 9,
    SEQUENCE_DEFAULT_HEAVY_HIT1 = 10,
    SEQUENCE_DEFAULT_HEAVY_BACKSTAB = 11,
    SEQUENCE_DEFAULT_LOOKAT01 = 12,

    SEQUENCE_BUTTERFLY_DRAW = 0,
    SEQUENCE_BUTTERFLY_DRAW2 = 1,
    SEQUENCE_BUTTERFLY_LOOKAT01 = 13,
    SEQUENCE_BUTTERFLY_LOOKAT02 = 14,
    SEQUENCE_BUTTERFLY_LOOKAT03 = 15,

    SEQUENCE_FALCHION_IDLE1 = 1,
    SEQUENCE_FALCHION_HEAVY_MISS1 = 8,
    SEQUENCE_FALCHION_HEAVY_MISS1_NOFLIP = 9,
    SEQUENCE_FALCHION_LOOKAT01 = 12,
    SEQUENCE_FALCHION_LOOKAT02 = 13,

    SEQUENCE_DAGGERS_IDLE1 = 1,
    SEQUENCE_DAGGERS_LIGHT_MISS1 = 2,
    SEQUENCE_DAGGERS_LIGHT_MISS5 = 6,
    SEQUENCE_DAGGERS_HEAVY_MISS2 = 11,
    SEQUENCE_DAGGERS_HEAVY_MISS1 = 12,

    SEQUENCE_BOWIE_IDLE1 = 1,
};

int skins::GetNewAnimation(std::string model, const int sequence)
{
    if (model == "models/weapons/v_knife_butterfly.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_DRAW:
            return random(SEQUENCE_BUTTERFLY_DRAW, SEQUENCE_BUTTERFLY_DRAW2);
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(SEQUENCE_BUTTERFLY_LOOKAT01, SEQUENCE_BUTTERFLY_LOOKAT02);
        default:
            return sequence + 1;
        }
    }
    if (model == "models/weapons/v_knife_falchion_advanced.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_IDLE2:
            return SEQUENCE_FALCHION_IDLE1;
        case SEQUENCE_DEFAULT_HEAVY_MISS1:
            return random(SEQUENCE_FALCHION_HEAVY_MISS1, SEQUENCE_FALCHION_HEAVY_MISS1_NOFLIP);
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(SEQUENCE_FALCHION_LOOKAT01, SEQUENCE_FALCHION_LOOKAT02);
        case SEQUENCE_DEFAULT_DRAW:
        case SEQUENCE_DEFAULT_IDLE1:
            return sequence;
        default:
            return sequence - 1;
        }
    }
    if (model == "models/weapons/v_knife_push.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_IDLE2:
            return SEQUENCE_DAGGERS_IDLE1;
        case SEQUENCE_DEFAULT_LIGHT_MISS1:
        case SEQUENCE_DEFAULT_LIGHT_MISS2:
            return random(SEQUENCE_DAGGERS_LIGHT_MISS1, SEQUENCE_DAGGERS_LIGHT_MISS5);
        case SEQUENCE_DEFAULT_HEAVY_MISS1:
            return random(SEQUENCE_DAGGERS_HEAVY_MISS2, SEQUENCE_DAGGERS_HEAVY_MISS1);
        case SEQUENCE_DEFAULT_HEAVY_HIT1:
        case SEQUENCE_DEFAULT_HEAVY_BACKSTAB:
        case SEQUENCE_DEFAULT_LOOKAT01:
            return sequence + 3;
        case SEQUENCE_DEFAULT_DRAW:
        case SEQUENCE_DEFAULT_IDLE1:
            return sequence;
        default:
            return sequence + 2;
        }
    }
    if (model == "models/weapons/v_knife_survival_bowie.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_DRAW:
        case SEQUENCE_DEFAULT_IDLE1:
            return sequence;
        case SEQUENCE_DEFAULT_IDLE2:
            return SEQUENCE_BOWIE_IDLE1;
        default:
            return sequence - 1;
        }
    }
    if (model == "models/weapons/v_knife_ursus.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_DRAW:
            return random(SEQUENCE_BUTTERFLY_DRAW, SEQUENCE_BUTTERFLY_DRAW2);
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(SEQUENCE_BUTTERFLY_LOOKAT01, 14);
        default:
            return sequence + 1;
        }
    }
    if (model == "models/weapons/v_knife_stiletto.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(12, 13);
        }
    }
    if (model == "models/weapons/v_knife_widowmaker.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(14, 15);
        case SEQUENCE_DEFAULT_HEAVY_BACKSTAB:
            return sequence - 1;
        }
    }
    if ((model == "models/weapons/v_knife_canis.mdl") || (model == "models/weapons/v_knife_outdoor.mdl") || (model == "models/weapons/v_knife_cord.mdl") || (model == "models/weapons/v_knife_skeleton.mdl")) {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_DRAW:
            return random(SEQUENCE_BUTTERFLY_DRAW, SEQUENCE_BUTTERFLY_DRAW2);
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(SEQUENCE_BUTTERFLY_LOOKAT01, 14);
        default:
            return sequence + 1;
        }
    }
    return sequence;
}
 
Забаненный
Статус
Оффлайн
Регистрация
22 Мар 2021
Сообщения
1,019
Реакции[?]
314
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
да вроде как присутствует

C++:
enum ESequence
{
    SEQUENCE_DEFAULT_DRAW = 0,
    SEQUENCE_DEFAULT_IDLE1 = 1,
    SEQUENCE_DEFAULT_IDLE2 = 2,
    SEQUENCE_DEFAULT_LIGHT_MISS1 = 3,
    SEQUENCE_DEFAULT_LIGHT_MISS2 = 4,
    SEQUENCE_DEFAULT_HEAVY_MISS1 = 9,
    SEQUENCE_DEFAULT_HEAVY_HIT1 = 10,
    SEQUENCE_DEFAULT_HEAVY_BACKSTAB = 11,
    SEQUENCE_DEFAULT_LOOKAT01 = 12,

    SEQUENCE_BUTTERFLY_DRAW = 0,
    SEQUENCE_BUTTERFLY_DRAW2 = 1,
    SEQUENCE_BUTTERFLY_LOOKAT01 = 13,
    SEQUENCE_BUTTERFLY_LOOKAT02 = 14,
    SEQUENCE_BUTTERFLY_LOOKAT03 = 15,

    SEQUENCE_FALCHION_IDLE1 = 1,
    SEQUENCE_FALCHION_HEAVY_MISS1 = 8,
    SEQUENCE_FALCHION_HEAVY_MISS1_NOFLIP = 9,
    SEQUENCE_FALCHION_LOOKAT01 = 12,
    SEQUENCE_FALCHION_LOOKAT02 = 13,

    SEQUENCE_DAGGERS_IDLE1 = 1,
    SEQUENCE_DAGGERS_LIGHT_MISS1 = 2,
    SEQUENCE_DAGGERS_LIGHT_MISS5 = 6,
    SEQUENCE_DAGGERS_HEAVY_MISS2 = 11,
    SEQUENCE_DAGGERS_HEAVY_MISS1 = 12,

    SEQUENCE_BOWIE_IDLE1 = 1,
};

int skins::GetNewAnimation(std::string model, const int sequence)
{
    if (model == "models/weapons/v_knife_butterfly.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_DRAW:
            return random(SEQUENCE_BUTTERFLY_DRAW, SEQUENCE_BUTTERFLY_DRAW2);
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(SEQUENCE_BUTTERFLY_LOOKAT01, SEQUENCE_BUTTERFLY_LOOKAT02);
        default:
            return sequence + 1;
        }
    }
    if (model == "models/weapons/v_knife_falchion_advanced.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_IDLE2:
            return SEQUENCE_FALCHION_IDLE1;
        case SEQUENCE_DEFAULT_HEAVY_MISS1:
            return random(SEQUENCE_FALCHION_HEAVY_MISS1, SEQUENCE_FALCHION_HEAVY_MISS1_NOFLIP);
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(SEQUENCE_FALCHION_LOOKAT01, SEQUENCE_FALCHION_LOOKAT02);
        case SEQUENCE_DEFAULT_DRAW:
        case SEQUENCE_DEFAULT_IDLE1:
            return sequence;
        default:
            return sequence - 1;
        }
    }
    if (model == "models/weapons/v_knife_push.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_IDLE2:
            return SEQUENCE_DAGGERS_IDLE1;
        case SEQUENCE_DEFAULT_LIGHT_MISS1:
        case SEQUENCE_DEFAULT_LIGHT_MISS2:
            return random(SEQUENCE_DAGGERS_LIGHT_MISS1, SEQUENCE_DAGGERS_LIGHT_MISS5);
        case SEQUENCE_DEFAULT_HEAVY_MISS1:
            return random(SEQUENCE_DAGGERS_HEAVY_MISS2, SEQUENCE_DAGGERS_HEAVY_MISS1);
        case SEQUENCE_DEFAULT_HEAVY_HIT1:
        case SEQUENCE_DEFAULT_HEAVY_BACKSTAB:
        case SEQUENCE_DEFAULT_LOOKAT01:
            return sequence + 3;
        case SEQUENCE_DEFAULT_DRAW:
        case SEQUENCE_DEFAULT_IDLE1:
            return sequence;
        default:
            return sequence + 2;
        }
    }
    if (model == "models/weapons/v_knife_survival_bowie.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_DRAW:
        case SEQUENCE_DEFAULT_IDLE1:
            return sequence;
        case SEQUENCE_DEFAULT_IDLE2:
            return SEQUENCE_BOWIE_IDLE1;
        default:
            return sequence - 1;
        }
    }
    if (model == "models/weapons/v_knife_ursus.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_DRAW:
            return random(SEQUENCE_BUTTERFLY_DRAW, SEQUENCE_BUTTERFLY_DRAW2);
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(SEQUENCE_BUTTERFLY_LOOKAT01, 14);
        default:
            return sequence + 1;
        }
    }
    if (model == "models/weapons/v_knife_stiletto.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(12, 13);
        }
    }
    if (model == "models/weapons/v_knife_widowmaker.mdl")
    {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(14, 15);
        case SEQUENCE_DEFAULT_HEAVY_BACKSTAB:
            return sequence - 1;
        }
    }
    if ((model == "models/weapons/v_knife_canis.mdl") || (model == "models/weapons/v_knife_outdoor.mdl") || (model == "models/weapons/v_knife_cord.mdl") || (model == "models/weapons/v_knife_skeleton.mdl")) {
        switch (sequence)
        {
        case SEQUENCE_DEFAULT_DRAW:
            return random(SEQUENCE_BUTTERFLY_DRAW, SEQUENCE_BUTTERFLY_DRAW2);
        case SEQUENCE_DEFAULT_LOOKAT01:
            return random(SEQUENCE_BUTTERFLY_LOOKAT01, 14);
        default:
            return sequence + 1;
        }
    }
    return sequence;
}
в каком хуке юзаешь
 
life is cheap, death is free!
Эксперт
Статус
Оффлайн
Регистрация
9 Дек 2019
Сообщения
1,602
Реакции[?]
513
Поинты[?]
2K
в каком хуке юзаешь
К сожалению оказывается в никаком, у меня хук был в комментах

C++:
    void RecvProxy(const CRecvProxyData* pData, void* entity, void* output)
    {
        static auto ofunc = sequence_hook->get_original_function();
        
        if (g_LocalPlayer && g_LocalPlayer->IsAlive()) {
            const auto proxy_data = const_cast<CRecvProxyData*>(pData);
            const auto view_model = static_cast<C_BaseViewModel*>(entity);

            if (view_model && view_model->m_hOwner() && view_model->m_hOwner().IsValid()) {
                const auto owner = static_cast<C_BasePlayer*>(g_EntityList->GetClientEntityFromHandle(view_model->m_hOwner()));
                if (owner == g_EntityList->GetClientEntity(g_EngineClient->GetLocalPlayer())) {
                    const auto view_model_weapon_handle = view_model->m_hWeapon();
                    if (view_model_weapon_handle.IsValid()) {
                        const auto view_model_weapon = static_cast<C_BaseAttributableItem*>(g_EntityList->GetClientEntityFromHandle(view_model_weapon_handle));
                        if (view_model_weapon) {
                            if (k_weapon_info.count(view_model_weapon->m_Item().m_iItemDefinitionIndex())) {
                                auto original_sequence = proxy_data->m_Value.m_Int;
                                const auto override_model = k_weapon_info.at(view_model_weapon->m_Item().m_iItemDefinitionIndex()).model;
                                proxy_data->m_Value.m_Int = skins::GetNewAnimation(override_model, proxy_data->m_Value.m_Int);
                            }
                        }
                    }
                }
            }

        }

        ofunc(pData, entity, output);
    }
 
Эксперт
Статус
Оффлайн
Регистрация
7 Сен 2019
Сообщения
2,106
Реакции[?]
984
Поинты[?]
88K
Тьомчик
Участник
Статус
Оффлайн
Регистрация
30 Июн 2020
Сообщения
751
Реакции[?]
153
Поинты[?]
61K
Сверху Снизу