summaryrefslogtreecommitdiff
path: root/cheat/internal_rewrite/update_clientside_animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cheat/internal_rewrite/update_clientside_animation.cpp')
-rw-r--r--cheat/internal_rewrite/update_clientside_animation.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/cheat/internal_rewrite/update_clientside_animation.cpp b/cheat/internal_rewrite/update_clientside_animation.cpp
index 201d100..622fc46 100644
--- a/cheat/internal_rewrite/update_clientside_animation.cpp
+++ b/cheat/internal_rewrite/update_clientside_animation.cpp
@@ -39,8 +39,20 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) {
ent->get_animstate( )->m_bOnGround = false;
ent->invalidate_bone_cache( );
- ent->ce( )->SetupBones( nullptr, 128, BONE_USED_BY_ANYTHING, 0.f );
+ auto model = ent->ce( )->GetModel( );
+ auto hdr = g_csgo.m_model_info( )->GetStudiomodel( model );
+ auto set = hdr->pHitboxSet( ent->m_nHitboxSet( ) );
+
+ if( hdr && set ) {
+ for( size_t i{ }; i < hdr->numbones; i++ ) {
+ auto bone = hdr->GetBone( i );
+
+ bone->proctype &= ~5;
+ }
+ }
+
+ ent->ce( )->SetupBones( nullptr, 128, BONE_USED_BY_ANYTHING, 0.f );
ent->get_animstate( )->m_bOnGround = backup;
}