summaryrefslogtreecommitdiff
path: root/internal_rewrite/update_clientside_animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'internal_rewrite/update_clientside_animation.cpp')
-rw-r--r--internal_rewrite/update_clientside_animation.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/internal_rewrite/update_clientside_animation.cpp b/internal_rewrite/update_clientside_animation.cpp
index e7889c1..5dc14e6 100644
--- a/internal_rewrite/update_clientside_animation.cpp
+++ b/internal_rewrite/update_clientside_animation.cpp
@@ -24,26 +24,20 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) {
if( last_spawntime != ent->m_flSpawnTime( ) )
last_spawntime = ent->m_flSpawnTime( );
- return old_func( ecx_, edx_ );
+ old_func( ecx_, edx_ );
+ ent->cache_anim_data( );
+
+ return;
}
last_update = g_csgo.m_globals->m_curtime;
- float backup_curtime = g_csgo.m_globals->m_curtime;
- float backup_frametime = g_csgo.m_globals->m_frametime;
-
- g_csgo.m_globals->m_curtime = g_ctx.pred_time( );
- g_csgo.m_globals->m_frametime = TICK_INTERVAL( );
-
- ent->get_animstate( )->m_iLastClientSideAnimationUpdateFramecount = g_csgo.m_globals->m_framecount;
- //ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime = g_csgo.m_globals->m_curtime;
- old_func( ecx_, edx_ );
-
- g_csgo.m_globals->m_curtime = backup_curtime;
- g_csgo.m_globals->m_frametime = backup_frametime;
+ if( g_cheat.m_lagmgr.get_choked( ) == 1 )
+ ent->cache_anim_data( );
if( !first_update ) {
- //*( byte* )( uintptr_t( ent ) + 0x270 ) = 0;
+ ent->restore_anim_data( true );
+
ent->set_abs_angles( vec3_t( 0, ent->get_animstate( )->m_flGoalFeetYaw, 0 ) );
bool backup = ent->get_animstate( )->m_bOnGround;
ent->get_animstate( )->m_bOnGround = false;