diff options
| author | boris <wzn@moneybot.cc> | 2018-12-24 20:39:16 +1300 |
|---|---|---|
| committer | boris <wzn@moneybot.cc> | 2018-12-24 20:39:16 +1300 |
| commit | cac146640ad99309329119ceb264542de12bc9aa (patch) | |
| tree | c853c09991593b60b0249e4a237bb898432c220c /cheat/internal_rewrite/update_clientside_animation.cpp | |
| parent | ace9ae2117175dfe5e14b259db2e0536f8ec7a8a (diff) | |
| parent | f41bf6509390f12a4252f40daf0209e7a7d64666 (diff) | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'cheat/internal_rewrite/update_clientside_animation.cpp')
| -rw-r--r-- | cheat/internal_rewrite/update_clientside_animation.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cheat/internal_rewrite/update_clientside_animation.cpp b/cheat/internal_rewrite/update_clientside_animation.cpp index 9a0dd2b..243d760 100644 --- a/cheat/internal_rewrite/update_clientside_animation.cpp +++ b/cheat/internal_rewrite/update_clientside_animation.cpp @@ -29,14 +29,19 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { last_update = g_csgo.m_globals->m_curtime;
ent->get_animstate( )->m_iLastClientSideAnimationUpdateFramecount = g_csgo.m_globals->m_framecount;
+
+ float backup_time = ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime;
+
+ ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime = g_csgo.m_globals->m_curtime;
old_func( ecx_, edx_ );
+ ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime = backup_time;
+
if( !first_update ) {
g_ctx.m_local->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;
+ ent->set_abs_angles( vec3_t( 0, g_ctx.m_absyaw, 0 ) );
+ //ent->get_animstate( )->m_bOnGround = false;
ent->invalidate_bone_cache( );
@@ -52,8 +57,10 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { }
}
+ byte backup = ent->get< byte >( 0x274 );
+ ent->get< byte >( 0x274 ) = 0;
ent->ce( )->SetupBones( nullptr, 128, BONE_USED_BY_ANYTHING, 0.f );
- ent->get_animstate( )->m_bOnGround = backup;
+ ent->get< byte >( 0x274 ) = backup;
}
first_update = false;
|
