-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
void __stdcall Hooks::hkCreateMove(int sequence_number, float input_sample_frametime, bool active, bool& bSendPacket)
{
static auto oCreateMove = hlclient_hook.get_original<decltype(&hkCreateMove_Proxy)>(index::CreateMove);
oCreateMove(g_CHLClient, 0, sequence_number, input_sample_frametime, active);
auto cmd = g_Input->GetUserCmd(sequence_number);
auto verified = g_Input->GetVerifiedUserCmd(sequence_number);
if (!cmd || !cmd->command_number)
return;
if (!g_LocalPlayer)
return;
Globals::cmd = cmd;
if (g_Options.misc_bhop)
BunnyHop::OnCreateMove(cmd);
if (g_Options.misc_autostrafer)
BunnyHop::AutoStrafe(cmd, cmd->viewangles);
if (g_Options.misc_chat_spammer > 0)
ChatSpammer();
static float SpawnTime = 0.0f;
if (g_LocalPlayer->m_flSpawnTime() != SpawnTime) {
g_AnimState.pBaseEntity = g_LocalPlayer;
g_LocalPlayer->ResetAnimationState(&g_AnimState);
SpawnTime = g_LocalPlayer->m_flSpawnTime();
}
Clantag();
NameSteal();
auto unpred_flags = g_LocalPlayer->m_fFlags();
auto oldangles = cmd->viewangles;
g_Options.dista = cmd->random_seed;
//entities::fetch_targets(cmd);
EnginePred::BeginPred(cmd);
//c_prediction_system::Get().initial(g_LocalPlayer, cmd, 0);
{
AutoBlock(cmd);
if (cmd->command_number % 2 == 1 && bSendPacket && !(g_Options.fakeduck && GetAsyncKeyState(g_Options.fakeduck_bind)) && g_Options.misc_desync)
bSendPacket = false;
if (g_Options.edgejump && GetAsyncKeyState(g_Options.edgejump_bind))
{
if ((unpred_flags & FL_ONGROUND) && !(g_LocalPlayer->m_fFlags() & FL_ONGROUND))
cmd->buttons |= IN_JUMP;
}
QAngle angleold = cmd->viewangles;
if (g_LocalPlayer->m_hActiveWeapon())
{
g_Aimbot.OnMove(cmd);
if (g_Options.slide)
SlideWalk(cmd);
if (g_Options.autoreload)
AutoWeapons(cmd);
g_Backtrack.OnMove(cmd);
if (g_Options.trigenable || g_LocalPlayer->m_hActiveWeapon()->m_Item().m_iItemDefinitionIndex() == WEAPON_TASER)
TriggerBot(cmd);
if (g_Options.kbot)
knifebot(cmd);
}
if (g_Options.misc_walkbot)
Walkbot(oldangles, cmd);
if (g_Options.misc_desync && g_ClientState->chokedcommands >= max_choke_ticks()) {
bSendPacket = true;
cmd->viewangles = g_ClientState->viewangles;
}
if (g_Options.misc_desync && std::fabsf(g_LocalPlayer->m_flSpawnTime() - g_GlobalVars->curtime) > 1.0f)
Desync(cmd, bSendPacket);
CorrectMouse(cmd);
auto anim_state = g_LocalPlayer->GetPlayerAnimState();
if (anim_state) {
CCSGOPlayerAnimState anim_state_backup = *anim_state;
*anim_state = g_AnimState;
g_LocalPlayer->GetVAngles() = cmd->viewangles;
g_LocalPlayer->UpdateClientSideAnimation();
updatelby(anim_state);
g_AnimState = *anim_state;
*anim_state = anim_state_backup;
}
if (bSendPacket) {
anglereal = g_AnimState.m_flGoalFeetYaw;
if (anim_state)
anglefake = anim_state->m_flGoalFeetYaw;
vangle = cmd->viewangles;
}
Slowwalk(cmd);
fix_movement(cmd, angleold);
}
EnginePred::EndPred();
//if (g_Options.fakeduck && GetAsyncKeyState(g_Options.fakeduck_bind) && !g_EngineClient->IsVoiceRecording())
// fakeduck(cmd, bSendPacket);
//if (g_Options.fakeduck && GetAsyncKeyState(g_Options.fakeduck_bind));
// cmd->buttons |= IN_BULLRUSH;
if (!g_EngineClient->IsVoiceRecording() && !(g_Options.fakeduck && GetAsyncKeyState(g_Options.fakeduck_bind)))
Fakelag(cmd, bSendPacket);
nosmoke();
if (g_LocalPlayer && InputSys::Get().IsKeyDown(VK_TAB) && g_Options.misc_rankreveal)
Utils::RankRevealAll();
if (g_Options.antiuntrusted)
{
Math::ClampAngles(cmd->viewangles);
}
//if ()
//g_InputSystem->EnableInput();
verified->m_cmd = *cmd;
verified->m_crc = cmd->GetChecksum();
}
__declspec(naked) void __fastcall Hooks::hkCreateMove_Proxy(void* _this, int, int sequence_number, float input_sample_frametime, bool active)
{
__asm
{
push ebp
mov ebp, esp
push ebx; not sure if we need this
push esp
push dword ptr[active]
push dword ptr[input_sample_frametime]
push dword ptr[sequence_number]
call Hooks::hkCreateMove
pop ebx
pop ebp
retn 0Ch
}
}