summaryrefslogtreecommitdiff
path: root/cheat/internal_rewrite/update_clientside_animation.cpp
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2018-12-03 22:03:34 +0100
committernavewindre <boneyaard@gmail.com>2018-12-03 22:03:41 +0100
commit716be28826ac61491944490373402c39123a1d75 (patch)
tree60614ff806843ccfde19c95bd28a8a25a230a54f /cheat/internal_rewrite/update_clientside_animation.cpp
parent4047e9083ef1731847bcd75f361f2d611fe5e401 (diff)
boris is cool
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;
}