Исходник Cl_move Double_tap [lw]

Пользователь
Статус
Оффлайн
Регистрация
3 Июл 2021
Сообщения
825
Реакции[?]
93
Поинты[?]
10K
Код не мой, купил у какого-то чела, биг кодеры югеима, дополните чего не хватает
[DT]
Код:
bool misc::rapid_fire(CUserCmd* m_pcmd)
{
    rapid_fire_enabled = true;

    static auto recharge_rapid_fire = false;
    static bool firing_dt = false;
    static int last_double_tap = 0;
    bool remove_knife = false;

    if (recharge_rapid_fire)
    {
        recharge_rapid_fire = false;
        recharging_rapid_fire = true;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    auto max_tickbase_shift = globals.g.weapon->get_max_tickbase_shift();
    if (recharging_rapid_fire)
    {
        bool in_attack = m_pcmd->m_buttons & IN_ATTACK;

        bool can_recharge = globals.g.weapon->is_sniper() ? globals.g.weapon->can_fire(true, max_tickbase_shift)
            : fabs(globals.g.fixed_tickbase - last_double_tap) > TIME_TO_TICKS(0.75f);

        if (!in_attack && !aim::get().should_stop && can_recharge)
        {
            recharging_rapid_fire = false;
            rapid_fire_key = true;
            firing_dt = false;
        }
        else if (in_attack)
        {
            firing_dt = true;
            last_double_tap = globals.g.fixed_tickbase;
        }
    }

    if (!g_cfg.ragebot.enable)
    {
        rapid_fire_enabled = false;
        rapid_fire_key = false;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    if (!g_cfg.ragebot.double_tap)
    {
        rapid_fire_enabled = false;
        rapid_fire_key = false;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    static bool was_in_dt = false;

    if (g_cfg.ragebot.double_tap_key.key <= KEY_NONE || g_cfg.ragebot.double_tap_key.key >= KEY_MAX)
    {
        rapid_fire_enabled = false;
        rapid_fire_key = false;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    if (rapid_fire_key && g_cfg.ragebot.double_tap_key.key != g_cfg.antiaim.hide_shots_key.key)
        hide_shots_key = false;

    if (!rapid_fire_key
        || globals.local()->m_bGunGameImmunity()
        || globals.local()->m_fFlags() & FL_FROZEN
        || globals.g.fakeducking)
    {
        rapid_fire_enabled = false;

        if (!firing_dt && was_in_dt)
        {
            globals.g.trigger_teleport = true;
            globals.g.teleport_amount = 14;

            was_in_dt = false;
        }

        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;

        return false;
    }

    if (m_gamerules()->m_bIsValveDS())
    {
        rapid_fire_enabled = false;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    if (globals.g.weapon->is_knife())
        remove_knife = true;

    if (antiaim::get().freeze_check)
        return true;

    was_in_dt = true;

    bool can_peek = !globals.g.weapon->is_non_aim() && key_binds::get().get_key_bind_state(18);

    if (!globals.g.weapon->is_grenade() && globals.g.weapon->m_iItemDefinitionIndex() != WEAPON_TASER
        && globals.g.weapon->m_iItemDefinitionIndex() != WEAPON_REVOLVER
        && (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 && globals.g.weapon->is_knife())) //-V648
    {
        auto next_command_number = m_pcmd->m_command_number + 1;
        auto user_cmd = m_input()->GetUserCmd(next_command_number);

        memcpy(user_cmd, m_pcmd, sizeof(CUserCmd));
        user_cmd->m_command_number = next_command_number;

        util::copy_command(user_cmd, max_tickbase_shift);

        globals.send_packet = true;

        if (globals.g.aimbot_working)
        {
            globals.g.double_tap_aim = true;
            globals.g.double_tap_aim_check = true;
        }

        recharge_rapid_fire = true;
        rapid_fire_enabled = false;
        rapid_fire_key = false;
        last_double_tap = globals.g.fixed_tickbase;
        firing_dt = true;
    }
    else if (!globals.g.weapon->is_grenade() && globals.g.weapon->m_iItemDefinitionIndex() != WEAPON_TASER && globals.g.weapon->m_iItemDefinitionIndex() != WEAPON_REVOLVER)
        globals.g.tickbase_shift = max_tickbase_shift;

    return true;
}
misc.hpp
Код:
заменить
*/
        bool rapid_fire(CUserCmd* m_pcmd);

    bool recharging_rapid_fire = false;
    bool rapid_fire_enabled = false;
    bool rapid_fire_key = false;
util.cpp
Код:
заменить
*/
void copy_command(CUserCmd* cmd, int tickbase_shift)
    {
        bool can_peek = !globals.g.weapon->is_non_aim() && key_binds::get().get_key_bind_state(18);

        auto fast_stop = [&](CUserCmd* cur_cmd)
        {
            if (!can_peek)
                return;

            auto velocity = globals.local()->m_vecVelocity();

            if (velocity.Length2D() > 20.0f)
            {
                Vector direction;
                Vector real_view;

                math::vector_angles(velocity, direction);
                m_engine()->GetViewAngles(real_view);

                direction.y = real_view.y - direction.y;

                Vector forward;
                math::angle_vectors(direction, forward);

                static auto cl_forwardspeed = m_cvar()->FindVar(crypt_str("cl_forwardspeed"));
                static auto cl_sidespeed = m_cvar()->FindVar(crypt_str("cl_sidespeed"));

                auto negative_forward_speed = -cl_forwardspeed->GetFloat();
                auto negative_side_speed = -cl_sidespeed->GetFloat();

                auto negative_forward_direction = forward * negative_forward_speed;
                auto negative_side_direction = forward * negative_side_speed;

                cur_cmd->m_forwardmove = negative_forward_direction.x;
                cur_cmd->m_sidemove = negative_side_direction.y;
            }
        };

        Vector wish_angle;
        m_engine()->GetViewAngles(wish_angle);

        util::movement_fix(wish_angle, cmd);

        fast_stop(cmd);

        auto commands_to_add = 0;

        do
        {
            auto sequence_number = commands_to_add + cmd->m_command_number;

            auto command = m_input()->GetUserCmd(sequence_number);
            auto verified_command = m_input()->GetVerifiedUserCmd(sequence_number);

            memcpy(command, cmd, sizeof(CUserCmd)); //-V598

            if (command->m_tickcount != INT_MAX && m_clientstate()->iDeltaTick > 0)
                m_prediction()->Update(m_clientstate()->iDeltaTick,
                    true,
                    m_clientstate()->nLastCommandAck,
                    m_clientstate()->nLastOutgoingCommand + m_clientstate()->iChokedCommands);

            command->m_command_number = sequence_number;
            command->m_predicted = command->m_tickcount != INT_MAX;

            ++m_clientstate()->iChokedCommands; //-V807

            if (m_clientstate()->pNetChannel)
            {
                ++m_clientstate()->pNetChannel->m_nChokedPackets;
                ++m_clientstate()->pNetChannel->m_nOutSequenceNr;
            }

            math::normalize_angles(command->m_viewangles);

            memcpy(&verified_command->m_cmd, command, sizeof(CUserCmd)); //-V598
            verified_command->m_crc = command->GetChecksum();

            ++commands_to_add;
        } while (commands_to_add != tickbase_shift);

        *(bool*)((uintptr_t)m_prediction() + 0x24) = true;
        *(int*)((uintptr_t)m_prediction() + 0x1C) = 0;
    }
ctx.cpp
Код:
после bool should_update_weather = false;
*/
bool trigger_teleport = false;
int teleport_amount = 0;
hooked_runcomand.cpp
Код:
using CLMove_t = void(__vectorcall*)(float, bool);
using ReadPacketEntities_t = void(__vectorcall*)(bool);

void __vectorcall hooks::hooked_clmove(float accumulated_extra_samples, bool bFinalTick)
{
    ((CLMove_t)original_clmove)(accumulated_extra_samples, bFinalTick);

    if (globals.available() && globals.local()->is_alive())
    {
        if (globals.g.trigger_teleport)
        {
            for (int i = 0; i < globals.g.teleport_amount; i++)
                ((CLMove_t)original_clmove)(accumulated_extra_samples, bFinalTick);

            globals.g.teleport_amount = 0;
            globals.g.trigger_teleport = false;
        }
    }
}
main.cpp (setup_hooks)
Код:
static auto clmove = (DWORD)(util::FindSignature(crypt_str("engine.dll"), crypt_str("55 8B EC 81 EC ? ? ? ? 53 56 8A F9")));
hooks::original_clmove = (DWORD)DetourFunction((PBYTE)clmove, (PBYTE)hooks::hooked_clmove); //-V206
structs.cpp
Код:
bool weapon_t::can_fire(bool check_revolver, int tick_base)
{
    if (!this) //-V704
        return false;

    if (!is_non_aim() && is_empty())
        return false;

    auto owner = (player_t*)m_entitylist()->GetClientEntityFromHandle(m_hOwnerEntity());

    if (owner == globals.local() && antiaim::get().freeze_check)
        return false;

    if (!owner->valid(false))
        return false;

    if (owner->m_bIsDefusing())
        return false;

    auto server_time = TICKS_TO_TIME(globals.g.fixed_tickbase - tick_base);

    if (server_time < m_flNextPrimaryAttack())
        return false;

    if (server_time < owner->m_flNextAttack())
        return false;

    if (check_revolver && m_iItemDefinitionIndex() == WEAPON_REVOLVER && m_flPostponeFireReadyTime() >= server_time)
        return false;

    return true;
}
hooks.cpp
Код:
после DWORD original_processinterpolatedlist;
*/
DWORD original_clmove;
hooks.hpp

Код:
//после extern DWORD original_processinterpolatedlist;
extern DWORD original_clmove;

/после bool __stdcall hooked_inprediction();
void __vectorcall hooked_clmove(float accumulated_extra_samples, bool bFinalTick);
 
mindset studio — yougame.biz/threads/284270
Дизайнер
Статус
Оффлайн
Регистрация
26 Дек 2018
Сообщения
280
Реакции[?]
266
Поинты[?]
86K
Ну телепорт на клмуве это теперь у нас получается фулл дт на клмуве :astonished:
 
Участник
Статус
Оффлайн
Регистрация
19 Апр 2020
Сообщения
1,179
Реакции[?]
314
Поинты[?]
152K
Код не мой, купил у какого-то чела, биг кодеры югеима, дополните чего не хватает
[DT]
Код:
bool misc::rapid_fire(CUserCmd* m_pcmd)
{
    rapid_fire_enabled = true;

    static auto recharge_rapid_fire = false;
    static bool firing_dt = false;
    static int last_double_tap = 0;
    bool remove_knife = false;

    if (recharge_rapid_fire)
    {
        recharge_rapid_fire = false;
        recharging_rapid_fire = true;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    auto max_tickbase_shift = globals.g.weapon->get_max_tickbase_shift();
    if (recharging_rapid_fire)
    {
        bool in_attack = m_pcmd->m_buttons & IN_ATTACK;

        bool can_recharge = globals.g.weapon->is_sniper() ? globals.g.weapon->can_fire(true, max_tickbase_shift)
            : fabs(globals.g.fixed_tickbase - last_double_tap) > TIME_TO_TICKS(0.75f);

        if (!in_attack && !aim::get().should_stop && can_recharge)
        {
            recharging_rapid_fire = false;
            rapid_fire_key = true;
            firing_dt = false;
        }
        else if (in_attack)
        {
            firing_dt = true;
            last_double_tap = globals.g.fixed_tickbase;
        }
    }

    if (!g_cfg.ragebot.enable)
    {
        rapid_fire_enabled = false;
        rapid_fire_key = false;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    if (!g_cfg.ragebot.double_tap)
    {
        rapid_fire_enabled = false;
        rapid_fire_key = false;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    static bool was_in_dt = false;

    if (g_cfg.ragebot.double_tap_key.key <= KEY_NONE || g_cfg.ragebot.double_tap_key.key >= KEY_MAX)
    {
        rapid_fire_enabled = false;
        rapid_fire_key = false;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    if (rapid_fire_key && g_cfg.ragebot.double_tap_key.key != g_cfg.antiaim.hide_shots_key.key)
        hide_shots_key = false;

    if (!rapid_fire_key
        || globals.local()->m_bGunGameImmunity()
        || globals.local()->m_fFlags() & FL_FROZEN
        || globals.g.fakeducking)
    {
        rapid_fire_enabled = false;

        if (!firing_dt && was_in_dt)
        {
            globals.g.trigger_teleport = true;
            globals.g.teleport_amount = 14;

            was_in_dt = false;
        }

        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;

        return false;
    }

    if (m_gamerules()->m_bIsValveDS())
    {
        rapid_fire_enabled = false;
        globals.g.ticks_allowed = 0;
        globals.g.next_tickbase_shift = 0;
        return false;
    }

    if (globals.g.weapon->is_knife())
        remove_knife = true;

    if (antiaim::get().freeze_check)
        return true;

    was_in_dt = true;

    bool can_peek = !globals.g.weapon->is_non_aim() && key_binds::get().get_key_bind_state(18);

    if (!globals.g.weapon->is_grenade() && globals.g.weapon->m_iItemDefinitionIndex() != WEAPON_TASER
        && globals.g.weapon->m_iItemDefinitionIndex() != WEAPON_REVOLVER
        && (m_pcmd->m_buttons & IN_ATTACK || m_pcmd->m_buttons & IN_ATTACK2 && globals.g.weapon->is_knife())) //-V648
    {
        auto next_command_number = m_pcmd->m_command_number + 1;
        auto user_cmd = m_input()->GetUserCmd(next_command_number);

        memcpy(user_cmd, m_pcmd, sizeof(CUserCmd));
        user_cmd->m_command_number = next_command_number;

        util::copy_command(user_cmd, max_tickbase_shift);

        globals.send_packet = true;

        if (globals.g.aimbot_working)
        {
            globals.g.double_tap_aim = true;
            globals.g.double_tap_aim_check = true;
        }

        recharge_rapid_fire = true;
        rapid_fire_enabled = false;
        rapid_fire_key = false;
        last_double_tap = globals.g.fixed_tickbase;
        firing_dt = true;
    }
    else if (!globals.g.weapon->is_grenade() && globals.g.weapon->m_iItemDefinitionIndex() != WEAPON_TASER && globals.g.weapon->m_iItemDefinitionIndex() != WEAPON_REVOLVER)
        globals.g.tickbase_shift = max_tickbase_shift;

    return true;
}
misc.hpp
Код:
заменить
*/
        bool rapid_fire(CUserCmd* m_pcmd);

    bool recharging_rapid_fire = false;
    bool rapid_fire_enabled = false;
    bool rapid_fire_key = false;
util.cpp
Код:
заменить
*/
void copy_command(CUserCmd* cmd, int tickbase_shift)
    {
        bool can_peek = !globals.g.weapon->is_non_aim() && key_binds::get().get_key_bind_state(18);

        auto fast_stop = [&](CUserCmd* cur_cmd)
        {
            if (!can_peek)
                return;

            auto velocity = globals.local()->m_vecVelocity();

            if (velocity.Length2D() > 20.0f)
            {
                Vector direction;
                Vector real_view;

                math::vector_angles(velocity, direction);
                m_engine()->GetViewAngles(real_view);

                direction.y = real_view.y - direction.y;

                Vector forward;
                math::angle_vectors(direction, forward);

                static auto cl_forwardspeed = m_cvar()->FindVar(crypt_str("cl_forwardspeed"));
                static auto cl_sidespeed = m_cvar()->FindVar(crypt_str("cl_sidespeed"));

                auto negative_forward_speed = -cl_forwardspeed->GetFloat();
                auto negative_side_speed = -cl_sidespeed->GetFloat();

                auto negative_forward_direction = forward * negative_forward_speed;
                auto negative_side_direction = forward * negative_side_speed;

                cur_cmd->m_forwardmove = negative_forward_direction.x;
                cur_cmd->m_sidemove = negative_side_direction.y;
            }
        };

        Vector wish_angle;
        m_engine()->GetViewAngles(wish_angle);

        util::movement_fix(wish_angle, cmd);

        fast_stop(cmd);

        auto commands_to_add = 0;

        do
        {
            auto sequence_number = commands_to_add + cmd->m_command_number;

            auto command = m_input()->GetUserCmd(sequence_number);
            auto verified_command = m_input()->GetVerifiedUserCmd(sequence_number);

            memcpy(command, cmd, sizeof(CUserCmd)); //-V598

            if (command->m_tickcount != INT_MAX && m_clientstate()->iDeltaTick > 0)
                m_prediction()->Update(m_clientstate()->iDeltaTick,
                    true,
                    m_clientstate()->nLastCommandAck,
                    m_clientstate()->nLastOutgoingCommand + m_clientstate()->iChokedCommands);

            command->m_command_number = sequence_number;
            command->m_predicted = command->m_tickcount != INT_MAX;

            ++m_clientstate()->iChokedCommands; //-V807

            if (m_clientstate()->pNetChannel)
            {
                ++m_clientstate()->pNetChannel->m_nChokedPackets;
                ++m_clientstate()->pNetChannel->m_nOutSequenceNr;
            }

            math::normalize_angles(command->m_viewangles);

            memcpy(&verified_command->m_cmd, command, sizeof(CUserCmd)); //-V598
            verified_command->m_crc = command->GetChecksum();

            ++commands_to_add;
        } while (commands_to_add != tickbase_shift);

        *(bool*)((uintptr_t)m_prediction() + 0x24) = true;
        *(int*)((uintptr_t)m_prediction() + 0x1C) = 0;
    }
ctx.cpp
Код:
после bool should_update_weather = false;
*/
bool trigger_teleport = false;
int teleport_amount = 0;
hooked_runcomand.cpp
Код:
using CLMove_t = void(__vectorcall*)(float, bool);
using ReadPacketEntities_t = void(__vectorcall*)(bool);

void __vectorcall hooks::hooked_clmove(float accumulated_extra_samples, bool bFinalTick)
{
    ((CLMove_t)original_clmove)(accumulated_extra_samples, bFinalTick);

    if (globals.available() && globals.local()->is_alive())
    {
        if (globals.g.trigger_teleport)
        {
            for (int i = 0; i < globals.g.teleport_amount; i++)
                ((CLMove_t)original_clmove)(accumulated_extra_samples, bFinalTick);

            globals.g.teleport_amount = 0;
            globals.g.trigger_teleport = false;
        }
    }
}
main.cpp (setup_hooks)
Код:
static auto clmove = (DWORD)(util::FindSignature(crypt_str("engine.dll"), crypt_str("55 8B EC 81 EC ? ? ? ? 53 56 8A F9")));
hooks::original_clmove = (DWORD)DetourFunction((PBYTE)clmove, (PBYTE)hooks::hooked_clmove); //-V206
structs.cpp
Код:
bool weapon_t::can_fire(bool check_revolver, int tick_base)
{
    if (!this) //-V704
        return false;

    if (!is_non_aim() && is_empty())
        return false;

    auto owner = (player_t*)m_entitylist()->GetClientEntityFromHandle(m_hOwnerEntity());

    if (owner == globals.local() && antiaim::get().freeze_check)
        return false;

    if (!owner->valid(false))
        return false;

    if (owner->m_bIsDefusing())
        return false;

    auto server_time = TICKS_TO_TIME(globals.g.fixed_tickbase - tick_base);

    if (server_time < m_flNextPrimaryAttack())
        return false;

    if (server_time < owner->m_flNextAttack())
        return false;

    if (check_revolver && m_iItemDefinitionIndex() == WEAPON_REVOLVER && m_flPostponeFireReadyTime() >= server_time)
        return false;

    return true;
}
hooks.cpp
Код:
после DWORD original_processinterpolatedlist;
*/
DWORD original_clmove;
hooks.hpp

Код:
//после extern DWORD original_processinterpolatedlist;
extern DWORD original_clmove;

/после bool __stdcall hooked_inprediction();
void __vectorcall hooked_clmove(float accumulated_extra_samples, bool bFinalTick);
 
али рождение киберспортсмена ( стандоф 2 )
Эксперт
Статус
Оффлайн
Регистрация
21 Окт 2020
Сообщения
1,480
Реакции[?]
564
Поинты[?]
53K
Сколько почек продал чтоб купить это
 
Пользователь
Статус
Оффлайн
Регистрация
8 Июн 2020
Сообщения
196
Реакции[?]
63
Поинты[?]
28K
Спасибо за лик, попробую сегодня. Выше все пишут как будто есть что то лучше в паблике.
 
Забаненный
Статус
Оффлайн
Регистрация
6 Ноя 2021
Сообщения
14
Реакции[?]
20
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Поздравляю, ты купил сурс, который лежит в паблике
К тому же это не кл мув дт даже
 
Astty
Пользователь
Статус
Оффлайн
Регистрация
11 Окт 2020
Сообщения
435
Реакции[?]
56
Поинты[?]
0
А то что дт вызывается в create_move, не? там типо ничего менять не надо? хах
 
Сверху Снизу