-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
if ( record->m_flags.has( FL_ONGROUND ) )
{
if ( record->m_layers.at( 6 ).m_weight == 0.f )
velocity = vec3_t( 0.f, 0.f, 0.f );
else
{
auto weight = record->m_layers.at( 11 ).m_weight;
auto average_speed = velocity.length_2d( );
auto speed_as_trans = 0.55f - ( 1.f - weight ) * 0.35f;
// https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/game/shared/cstrike15/csgo_playeranimstate.cpp#L1205-L1206
if ( weight > 0.0f && weight < 1.0f || ( average_speed < speed_as_trans * 0.34f ) )
{
velocity.x /= average_speed;
velocity.y /= average_speed;
velocity.x *= speed_as_trans;
velocity.y *= speed_as_trans;
}
}
}