diff options
Diffstat (limited to 'internal_rewrite/c_base_player.cpp')
| -rw-r--r-- | internal_rewrite/c_base_player.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal_rewrite/c_base_player.cpp b/internal_rewrite/c_base_player.cpp index c1b8162..0d1edb5 100644 --- a/internal_rewrite/c_base_player.cpp +++ b/internal_rewrite/c_base_player.cpp @@ -741,7 +741,7 @@ void c_base_player::calc_anim_velocity( bool reset ) { if( anim_vel.length2d( ) < 1.f )
anim_vel = vec3_t( );
- int ticks = ( int )( 0.5f + TICK_INTERVAL( ) / delta );
+ int ticks = TIME_TO_TICKS( delta * .5f );
vec3_t est_tick_vel = math::lerp( last_velocity, velocity, .5f );
for( int i{ }; i < ticks; i++ ) {
if( est_tick_vel.length2d( ) < 1.f )
@@ -751,7 +751,7 @@ void c_base_player::calc_anim_velocity( bool reset ) { }
//assume fakewalk
- if( velocity.length2d( ) >= last_velocity.length2d( ) && est_tick_vel.length2d( ) < 5.f )
+ if( velocity.length2d( ) >= last_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( ) ) {
@@ -926,8 +926,7 @@ void c_base_player::fix_animations( bool reset, bool resolver_change ) { auto activity = get_seq_activity( m_AnimOverlay( ).GetElements( )[ 3 ].m_nSequence );
if( activity == 979 ) {
- float cycle = m_AnimOverlay( ).GetElements( )[ 3 ].m_flCycle;
- m_AnimOverlay( ).GetElements( )[ 3 ].m_flCycle = cycle > 0.5f ? 1.f : 0.f;
+ m_AnimOverlay( ).GetElements( )[ 3 ].m_flCycle = 0.f;
}
}
|
