ЧВК EB_LAN
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
// Fix jump fall ( poseparam 6 )
// ft Skeet.cc
if ( ( current->m_flags & valve::e_ent_flags::on_ground ) == 0 ) {
const auto& cur_land_or_climb_layer = current->m_anim_layers.at( 5u );
const auto& prev_land_or_climb_layer = previous->m_anim_layers.at( 5u );
if ( cur_land_or_climb_layer.m_weight > 0.f
&& cur_land_or_climb_layer.m_playback_rate > 0.f ) {
auto land_activity = entry.m_player->lookup_seq_act( cur_land_or_climb_layer.m_sequence );
if ( land_activity == 985 ) {
const auto v264 = prev_land_or_climb_layer.m_cycle;
const auto v265 = cur_land_or_climb_layer.m_cycle;
// Safety check to check if we should actually correct legs
if ( ( v265 != v264 || cur_land_or_climb_layer.m_sequence != prev_land_or_climb_layer.m_sequence ) && v264 > v265 ) {
// Skeet does this always but i dont think thats right
entry.m_player->pose_params( ).at( 6u ) = 0.f;
// Only do that if animstate valid
if ( anim_state ) {
// Rebuild time_since_in_air
anim_state->m_time_since_in_air = valve::to_time( valve::to_ticks( cur_land_or_climb_layer.m_cycle / cur_land_or_climb_layer.m_playback_rate ) );
// Should be correct in 2018
// Skeet does NOT do that
entry.m_player->pose_params( ).at( 6u ) = std::clamp( smoothstep_bounds( 0.72f, 1.52f, anim_state->m_time_since_in_air ), 0.f, 1.f );
}
}
}
}
}
else {
// uhm, SHOULD be correct ( ? )
anim_state->m_time_since_in_air = 0.f;
entry.m_player->pose_params( ).at( 6u ) = 0.f;
}
Пожалуйста, зарегистрируйтесь или авторизуйтесь, чтобы увидеть содержимое.