-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Суть такова, работают балансы, но не работают статики
Код:
void Misc::Desync(CUserCmd* cmd, bool* send_packet) {
if (cmd->buttons & (IN_ATTACK | IN_ATTACK2 | IN_USE) ||
g_LocalPlayer->m_nMoveType() == MOVETYPE_LADDER || g_LocalPlayer->m_nMoveType() == MOVETYPE_NOCLIP
|| !g_LocalPlayer->IsAlive())
return;
auto weapon = g_LocalPlayer->m_hActiveWeapon().Get();
if (!weapon) return;
auto weapon_index = weapon->m_Item().m_iItemDefinitionIndex();
if ((weapon_index == WEAPON_GLOCK || weapon_index == WEAPON_FAMAS) && weapon->m_flNextPrimaryAttack() >= g_GlobalVars->curtime)
return;
auto weapon_data = weapon->GetCSWeaponData();
if (weapon_data->WeaponType == WEAPONTYPE_GRENADE) {
if (!weapon->m_bPinPulled()) {
float throwTime = weapon->m_fThrowTime();
if (throwTime > 0.f)
return;
}
if ((cmd->buttons & IN_ATTACK) || (cmd->buttons & IN_ATTACK2)) {
if (weapon->m_fThrowTime() > 0.f)
return;
}
}
static bool broke_lby = false;
QAngle OldAngles = cmd->viewangles;
if (InputSys::Get().WasKeyPressed(Cfg.misc_desync_bind))
side = -side;
switch (Cfg.misc_desync) {
case 1: {
float minimal_move = g_LocalPlayer->m_fFlags() & IN_DUCK ? 3.0f : 1.0f;
bool should_move = g_LocalPlayer->m_vecVelocity().Length2D() <= 0.0f ||
std::fabsf(g_LocalPlayer->m_vecVelocity().z) <= 100.0f;
if (cmd->command_number % 2 == 1) {
cmd->viewangles.yaw += 120.0f * side;
if (should_move)
cmd->sidemove -= minimal_move;
*send_packet = false;
if (!send_packet) {
cmd->viewangles.yaw ? 58.0f : -58.0f;
}
}
else if (should_move)
cmd->sidemove += minimal_move;
} break;