-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
s/o estk, llama, sharklaser1, philip015, voronin, oneshot, geomayka, sosion, slazy, platina, ttx, and other..
C++:
void c_animation_system::simulate_player_animations( c_cs_player* player, c_lag_record* record, c_lag_record* previous_record, bool simulate_this_tick ) {
// get anim_state ptr
auto anim_state = player->get_anim_state( );
if ( !anim_state )
return;
// capture simulation ticks for bots
if ( record->m_bot )
record->m_ticks_to_simulate = 1;
// remove EFL_DIRTY_ABSVELOCITY | EFL_DIRTY_ABSTRANSFORM
player->get_iflags( ).remove( EFL_DIRTY_ABSVELOCITY | EFL_DIRTY_ABSTRANSFORM );
// simulate legit player
if ( !previous_record || ( record->m_ticks_to_simulate - 1 ) <= 1 ) {
// determinate player simulated tick
auto simulated_tick = TIME_TO_TICKS( player->get_sim_time( ) );
// set game data
m_globals( )->set_data( );
// set origin
player->set_abs_origin( record->m_origin );
// set velocity
player->set_base_velocity( record->m_velocity );
// restore game data
m_globals( )->restore_data( );
}
else {
// idk where...
}
}