на локал сервере все отлично при выключенных експлоитах не миссает в бектрек при дабл тапе очень жостко мисает void __fastcall hkRunCommand(IPrediction* thisptr, void* edx, CBasePlayer* player, CUserCmd* cmd, IMoveHelper* moveHelper) { static auto oRunCommand = (tRunCommand)(Hooks::PredictionVMT->GetOriginal(19)); if (!player || !cmd || player != Cheat.LocalPlayer) return oRunCommand(thisptr, edx, player, cmd, moveHelper); const float backup_velocity_modifier = player->m_flVelocityModifier(); if (cmd->tick_count > GlobalVars->tickcount * 2) { cmd->hasbeenpredicted = true; player->SetAbsOrigin(player->GetAbsOrigin()); if (EngineClient->IsPaused()) ++player->m_nTickBase(); return; } //EnginePrediction->PatchAttackPacket(cmd, true); oRunCommand(thisptr, edx, player, cmd, moveHelper); player->m_flVelocityModifier() = backup_velocity_modifier; for (auto i = ctx.shifted_commands.begin(); i != ctx.shifted_commands.end();) { auto command = *i; if (cmd->command_number - command > 64) { i = ctx.shifted_commands.erase(i); continue; } ++i; } //EnginePrediction->PatchAttackPacket(cmd, false); MoveHelper = moveHelper; } bool CLagCompensation::ValidRecord(LagRecord* record) { if (record->shifting_tickbase || record->breaking_lag_comp) return false; //float correct = 0.0f; //INetChannelInfo* nci = EngineClient->GetNetChannelInfo(); //if (nci) //{ // correct += nci->GetLatency(FLOW_OUTGOING) + nci->GetLatency(FLOW_INCOMING); //} //correct += GetLerpTime(); //correct = std::clamp(correct, 0.f, cvars.sv_maxunlag->GetFloat()); //float flTargetTime = record->m_flSimulationTime; //int tick_base = Cheat.LocalPlayer->m_nTickBase() - ctx.tickbase_shift; //float deltaTime = correct - (TICKS_TO_TIME(tick_base) - flTargetTime); //return std::fabs(deltaTime) < 0.2f; float correct = 0.0f; INetChannelInfo* nci = EngineClient->GetNetChannelInfo(); correct += nci->GetLatency(FLOW_OUTGOING) + nci->GetLatency(FLOW_INCOMING); correct += GetLerpTime(); correct = std::clamp(correct, 0.f, cvars.sv_maxunlag->GetFloat()); float delta_time = correct - (GlobalVars->curtime - record->m_flSimulationTime); if (std::fabs(delta_time) > 0.2f) return false; return true; }