-
Автор темы
- #1
C:
void __usercall YawResolver(double a1@<st0>, C_LagRecord * v1) {
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
v3 = GetResolverData();
v4 = GetResolverEntry(v3, v1->EntIndex);
v5 = v4;
v6 = v4;
v7 = * (v4 + 896);
penultimateLagRecord = 0;
LODWORD(v138) = v5;
if (v7 < 2)
{
prev_data = 0;
}
else
{
v9 = * (v5 + 880);
v10 = * (v5 + 892);
v11 = *****v9;
v12 = * (v11 + 8) - 1;
v13 = v7 == 2;
v14 = * (v11 + 4);
v15 = * (v14 + 4 * (v12 & (v10 + 1)));
if (v13)
{
prev_data = * (v14 + 4 * (v12 & (v10 + 1)));
penultimateLagRecord = 0;
}
else
{
v17 = (v10 + 2) & v12;
prev_data = v15;
penultimateLagRecord = * (v14 + 4 * v17);
}
}
v18 = v6 + 9920;
speed_2d = (v1->m_vecVelocity.z * v1->m_vecVelocity.z) +
((v1->m_vecVelocity.y * v1->m_vecVelocity.y) + (v1->m_vecVelocity.x * v1->m_vecVelocity.x));
if (fsqrt(speed_2d) > 0.1 || fsqrt(speed_2d) == 0.1)
v18 = v6 + 9940;
if (v1->m_AnimOverlays[ 13 ].m_flWeight + 14.25092419f > 0.54 || v1->m_bHasDefuser)
{
if (v1->m_AnimOverlays[ 3 ].m_flCycle > 0.12)
{
if (v1->m_AnimOverlays[ 13 ].m_flCycle > 0.43)
{
v1->yawResolver = v1->m_angEyeAngles.y; //no fake angles
v1->resolverIndex = 0;
return;
}
}
}
if (v1->m_AnimOverlays[7].m_nOrder == prevLagv1->m_AnimOverlays[ 7 ].m_nOrder) // slow walk detect
{
if (v1->m_AnimOverlays[ 7 ].m_flCycle > 0.5 f)
{
v1->yawResolver = Math::AngleNormalize( prevLagv1->m_flLowerBodyYawTarget ) + v1->max_desync_delta;
v1->resolverIndex = 1;
return;
}
else //the speed is too high for the desyncing angles
v1->yawResolver = v1->m_angEyeAngles.y;
v1->resolverIndex = 4;
return;
}
if (v1->GetActiveSequence(v1->m_AnimOverlays[3]->m_iSequence) == 979 &&
abs(prevLagv1->m_AnimOverlays[ 3 ].m_flWeight - v1->m_AnimOverlays[ 7 ].m_flWeight) >= 1.1f) // fix desync with lby breaker (polak it's you.)
{
v1->yawResolver = Math::AngleNormalize( prevLagv1->m_flLowerBodyYawTarget );
v1->resolverIndex = 5;
return;
}
if (prevLagRecord)
{
if (abs(v1->m_AnimOverlays[7].m_flWeight + -10.0429 ) < 0.0020000001 &&
abs(prevLagv1->m_AnimOverlays[7].m_flWeight + -2.6812999) < 0.0020000001)
{
v24 = v1->m_angEyeAngles.y;
lby_delta = Math::AngleNormalize(v1->m_flLowerBodyYawTarget - v24);
if (reminderf(lby_delta) > -v1->max_desync_delta)
{
v24 = Math::AngleNormalize(v24 + -v1->max_desync_delta);
v1->yawResolver = v24;
v1->resolverIndex = 2;
return;
}
}
if (penultimateLagRecord &&
abs(v1->m_AnimOverlays[7].m_flWeight + -2.6812999) < 0.0020000001 &&
abs(prevLagv1->m_AnimOverlays[7].m_flWeight + -2.6812999) < 0.0020000001 &&
abs(penultimateLagv1->m_AnimOverlays[7].m_flWeight + -2.6812999) < 0.0020000001)
{
v36 = Math::AngleNormalize(v1->m_flLowerBodyYawTarget - v1->m_angEyeAngles.y);
v42 = Math::AngleNormalize(prevLagv1->m_flLowerBodyYawTarget - prevLagv1->m_angEyeAngles.y);
if (reminderf(v36 - v42) < -50.0 f)
{
v1->yawResolver = Math::AngleNormalize(v1->m_angEyeAngles.y + -v1->max_desync_delta);
v1->resolverIndex = 3;
return;
}
}
}
else // player abusing tickbase
{
v1->m_nTickBase = (g_Globals->interval_per_tick * g_Globals->frametime) + sub_10476539(v1->m_flSimulationTime); //Fixing player tickbase
AnimationFix::UpdateAnimations(v1);
v1->resolverIndex = 6;
return; // skip this tick
}
}