if (/*lag_data->fakeangles && */cheat::Cvars.RageBot_Resolver.GetValue()/*&& lag_data->current_tick_max_delta > 10.f*/ && !m_player->IsBot())
{
auto speed = m_player->m_vecVelocity().Length2D();
if (m_player->m_fFlags() & FL_ONGROUND && !history_data->empty() && history_data->front().entity_flags & FL_ONGROUND)
{
if (speed < 0.1f)
{
auto delta = Math::AngleDiff(m_player->m_angEyeAngles().y, lag_data->no_side);
if (lag_data->server_anim_layers[3].m_flWeight == 0.0f && lag_data->server_anim_layers[3].m_flCycle == 0.0f) {
lag_data->resolving_way = Math::clamp((2 * (delta <= 0.f) - 1), -1, 1);// copysign(1, delta);
lag_data->animations_updated = true;
}
}
else if (!int(lag_data->server_anim_layers[12].m_flWeight * 1000.f))//(lag_data->server_anim_layers[6].m_flWeight * 1000.f) == (history_data->at(0).anim_layers[6].m_flWeight * 1000.f))
{
//2 = -1; 3 = 1; 1 = fake;
if (int(lag_data->server_anim_layers[6].m_flWeight * 1000.f) == int(lag_data->preserver_anim_layers[6].m_flWeight * 1000.f))
{
float delta1 = abs(lag_data->server_anim_layers[6].m_flPlaybackRate - lag_data->resolver_anim_layers[0][6].m_flPlaybackRate);
float delta2 = abs(lag_data->server_anim_layers[6].m_flPlaybackRate - lag_data->resolver_anim_layers[1][6].m_flPlaybackRate);
float delta3 = abs(lag_data->server_anim_layers[6].m_flPlaybackRate - lag_data->resolver_anim_layers[2][6].m_flPlaybackRate);
if (delta1 < delta3 || delta2 <= delta3 || (int)(float)(delta3 * 1000.0f)) {
if (delta1 >= delta2 && delta3 > delta2 && !(int)(float)(delta2 * 1000.0f))
{
//lag_data->resolving_method = 1;
lag_data->resolving_way = 1;
lag_data->animations_updated = true;
lag_data->resolved = true;
lag_data->last_anims_update_time = Source::m_pGlobalVars->realtime;
}
}
else
{
//lag_data->resolving_method = -1;
lag_data->resolving_way = -1;
lag_data->animations_updated = true;
lag_data->resolved = true;
lag_data->last_anims_update_time = Source::m_pGlobalVars->realtime;
}
}
}
}
}