diff options
| author | navewindre <boneyaard@gmail.com> | 2018-09-19 21:51:56 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-09-19 21:51:56 +0200 |
| commit | b1cd9458f103d99f4de1807f512ed9ffd2e38220 (patch) | |
| tree | 8bf1d12c82bb1786f992b1bee8b45a3ae343c659 /internal_rewrite/c_base_player.cpp | |
| parent | 62f253525bcc13fedba4df1b6d6be7eef2410d4e (diff) | |
dsad
Diffstat (limited to 'internal_rewrite/c_base_player.cpp')
| -rw-r--r-- | internal_rewrite/c_base_player.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/internal_rewrite/c_base_player.cpp b/internal_rewrite/c_base_player.cpp index eed90e0..07a90be 100644 --- a/internal_rewrite/c_base_player.cpp +++ b/internal_rewrite/c_base_player.cpp @@ -566,6 +566,9 @@ void c_base_player::do_ent_interpolation( bool reset ) { if( !lerp )
return;
+ if( anim_data->m_last_interp_origin.dist_to( anim_data->m_interp_origin ) > 64.f )
+ return;
+
for( size_t i{ }; i < 3; ++i ) {
if( !std::isfinite( anim_data->m_last_interp_origin[ i ] ) || !std::isfinite( anim_data->m_interp_origin[ i ] ) ) {
char error_msg[ 128 ];
@@ -742,13 +745,12 @@ void c_base_player::calc_anim_velocity( bool reset ) { est_tick_vel = friction( est_tick_vel );
}
+ if( velocity.length2d( ) > last_velocity.length2d( ) )
+ anim_vel = accelerate( anim_vel, wishdir, 250.f, sv_accelerate->get_float( ) );
+
//assume fakewalk
- if( velocity.length2d( ) >= last_velocity.length2d( ) && est_tick_vel.length2d( ) < 5.f && delta > TICK_INTERVAL( ) )
+ if( anim_vel.length2d( ) >= sm_animdata[ idx ].m_anim_velocity.length2d( ) && est_tick_vel.length2d( ) < 5.f && delta > TICK_INTERVAL( ) )
anim_vel = vec3_t( );
-
- else if( anim_vel.length2d( ) >= 0.1f && velocity.length2d( ) > last_velocity.length2d( ) ) {
- anim_vel = accelerate( anim_vel, wishdir, 250.f, sv_accelerate->get_float( ) );
- }
}
else {
anim_vel = math::lerp(
|
