- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
//--------------------------------------------------------------------------------------------------------------------\\
float max_rotation = record->m_pEntity->GetMaxBodyRotation();
auto animstate = ent->m_PlayerAnimState();
float resolve_value = 50.f; //не трогайте это, так и должно быть
if (!record->m_pState)
return;
const auto info = g_anims.GetAnimationInfo(record->m_pEntity);
if (!info)
return;
float eye_yaw = record->m_pState->m_flEyeYaw;
if (max_rotation < resolve_value)
resolve_value = max_rotation;
data->m_extending = record->m_pLayers[3].m_cycle == 0.f && record->m_pLayers[3].m_weight == 0.f;
float Delta = AngleDiff(ent->m_angEyeAngles().y, animstate->m_flGoalFeetYaw);
//--------------------------------------------------------------------------------------------------------------------\\
RESOLVERPART
//--------------------------------------------------------------------------------------------------------------------\\
if (data->m_extending)
resolve_value = max_rotation;
if (ent->m_AnimOverlay()[13].m_weight + 14.250f > 0.54)
{
if (ent->m_AnimOverlay()[3].m_cycle > 0.12)
{
if (ent->m_AnimOverlay()[13].m_cycle > 0.43)
{
animstate->m_flGoalFeetYaw = ent->m_angEyeAngles().y;
}
}
}
if (data->m_extending)
{
if (Delta <= 0)
{
animstate->m_flGoalFeetYaw = Delta * resolve_value;
}
else if (Delta > 0)
{
animstate->m_flGoalFeetYaw = Delta * -resolve_value;
}
}
else if (ent->m_AnimOverlay()[7].m_order == record->m_pLayers[7].m_order)
{
if (ent->m_AnimOverlay()[7].m_cycle > 0.5f)
{
animstate->m_flGoalFeetYaw = math::NormalizeYaw(record->m_pEntity->m_flLowerBodyYawTarget()) + get_max_desync_delta;
return;
}
else
animstate->m_flGoalFeetYaw = record->m_pEntity->m_angEyeAngles().y;
}
if (record->m_bDidShot)
info->m_flBrute = Resolver::ResolveShot(data, record);
//--------------------------------------------------------------------------------------------------------------------\\
BRUTEFORCE PART
//--------------------------------------------------------------------------------------------------------------------\\
else {
float lbyt = record->m_pEntity->m_flLowerBodyYawTarget();
data->m_delta = std::abs(math::NormalizedAngle(eye_yaw - lbyt));
float resolve_yaw = ((data->m_delta < 0.f) ? resolve_value : resolve_value);
switch (data->m_missed_shots % 3) {
case 0:
info->m_flBrute = data->m_last_resolve = resolve_yaw;
break;
case 1:
info->m_flBrute = -data->m_last_resolve;
break;
case 2:
info->m_flBrute = 0;
break;
}
}
record->m_pState->m_flGoalFeetYaw = eye_yaw + info->m_flBrute;
//--------------------------------------------------------------------------------------------------------------------\\