From 7800db47f2cd00c4c01b002d85ec2c4c61e578e4 Mon Sep 17 00:00:00 2001 From: navewindre Date: Fri, 14 Sep 2018 16:38:28 +0200 Subject: s --- internal_rewrite/update_clientside_animation.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'internal_rewrite/update_clientside_animation.cpp') 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; -- cgit v1.2.3