From 716be28826ac61491944490373402c39123a1d75 Mon Sep 17 00:00:00 2001 From: navewindre Date: Mon, 3 Dec 2018 22:03:34 +0100 Subject: boris is cool --- cheat/internal_rewrite/update_clientside_animation.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'cheat/internal_rewrite/update_clientside_animation.cpp') 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; } -- cgit v1.2.3