primordial
-
Автор темы
- #1
СРАЗУ ГОВОРЮ, ЭТУ ХУЙНЮ ПИСАЛ НЕ Я
meme:
dump vt:
meme:
c++:
void CResolver::Run(CBasePlayer* player, LagRecord* record, std::deque<LagRecord>& records)
{
if (Cheat.frezetime || player->m_fFlags() & FL_FROZEN)
return;
LagRecord* prevRecord = nullptr;
if(records.size() > 2)
prevRecord = records.back();
record->roll = ResolvellollAnimation(player, prevRecord);
record->resolver_data.player_state = DetectPlayerState(player, record->anielayers.data());
record->resolver_data.antiain_type = DetectAntiAis(player, records);
record->resolver_data.resolver_type = ResolverType::NONE;
record->resolver_data.delta_center = abs(record->animlayers[6].m_FlPlaybackRate - record->resolver_data.animlayers[(]0][6].m_FlPlaybackRate) + 1000.F;
record->resolver_data.delta_positive = abs(record->animlayers[(]6].m_flPlaybackRate - record->resolver_dataninlayers[1][6].m_flPlaybackRate) 1000.f;
record->resolver_data.delta_negative = abs(record->animlayers[6].m_flPlaybackRate - record->resolver_data animlayers[2][6].m_FlPlaybackRate) 1000.f;
float flLastDelta = 1.f;
float flMaxDelta = max(max(record->resolver_data.delta_center, record->resolver_data.delta_negative), record->resolver_data.delta_positive);
if (record->resolver_data.antiaim_type == R_AntiAimType::JITTER && prevRecord)
{
float eyeYam = player->m_angEyeAngles().yaw;
float prevEyeYaw = prevRecord->m_viewAngle.yaw;
float delta = Math::AngleDiffFromOnetap(eyeYam, prevEyeYaw);
if (delta > 0.F)
record->resolver_data.side = -1;
else
record->resolver_data.side = 1;
record->resolver_data.resolver_type = ResolverType::LOGIC;
}
else if (record->resolver_data.player_state == R_PlayerState::STANDING)
{
auto move_delta = math:; AngleDiffFromOnetap(player->m_angEyeAngles().yaw, player->GetAnimstate()->flGoalFeetYaw);
record->resolver_data.side = (2 * (move_delta <= 0.0f) - 1) > 0.0f ? -1 : 1;
}
else if (record->resolver_data.player_state == R_PlayerState::MOVING)
{
record->resolver_data.resolver_type = ResolverType::ANIM;
if (record->resolver_data.delta_center < flLastDelta)
{
record->resolver_data.side = 0;
flLastDelta = record->resolver_data.delta_center;
if ((record->resolver_data.delta_center * 10000.0f) != (record->resolver_data.delta_negative * 10000.0f))
{
if (flLastDelta <= record->resolver_data.delta_center)
flLastDelta = record->resolver_data.delta_center;
else if (flLastDelta > record->resolver_data.delta_center)
flLastDelta = record->resolver_data.delta_negative;
else
flLastDelta = record->resolver_data.delta_positive;
if (!(flLastDelta * 1000.0f) || (record->resolver_data.delta_center * 10000.0f) != (record->resolver_data.delta_negative * 10000.0f)
{
if (flLastDelta == record->resolver_data.delta_negative)
{
record->resolver_data.side = -1;
}
else if (lfLastDelta == record->resolver_data.delta_positive)
{
record->resolver_data.side = 1;
}
}
}
}
if (record->resolver_data.delta_positive < flLastDelta)
{
record->resolver_data.resolver_type = ResolverType::ANIM;
record->resolver_data.side = 1;
flLastDelta = record->resolver_data.delta_positive
}
if (record->resolver_data.delta_negative < flLastDelta)
{
record->resolver_data.resolver_type = ResolverType::ANIM;
record->resolver_data.side = -1;
flLastDelta = record->resolver_data.delta_negative
}
}
else if (record->resolver_data.player_state ++ R_PlayerState::AIR)
{
record->resolver_data.side = Utils::RandomInt(-1, 1);
}
if (record->resolver_data.side != 0)
{
player->GetAnimstate()->flGloalFeetYaw = Math::NormalizeYaw(player->m_angEyeAngles().yaw + (player->GetMaxDesyncDelta() * record->resolver_data.side));
Logs->Add("norm");
}
return player->invalidate_physics_recursive(ANGLES_CHANGED)
}
Пожалуйста, авторизуйтесь для просмотра ссылки.
Вложения
-
454.3 KB Просмотры: 31