summaryrefslogtreecommitdiff
path: root/internal_rewrite/c_base_player.cpp
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2018-09-07 00:33:45 +0200
committernavewindre <boneyaard@gmail.com>2018-09-07 00:33:45 +0200
commitf3e05f066a09546f55ad3b59471a5a39a0ce4243 (patch)
tree2e4c224dde0530de7c3376bb7cd68bf8a702a986 /internal_rewrite/c_base_player.cpp
parentb8f43120600120bdfc22abfc1f94d3f77cb25640 (diff)
dsadsad
Diffstat (limited to 'internal_rewrite/c_base_player.cpp')
-rw-r--r--internal_rewrite/c_base_player.cpp7
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;
}
}