@@ -4049,7 +4049,6 @@ typedef void (__thiscall* hCAnimBlendStaticAssociation_Init)
4049
4049
4050
4050
bool CClientGame::AssocGroupCopyAnimationHandler ( CAnimBlendStaticAssociationSAInterface * pOutAnimStaticAssoc, SIFPAnimations ** pOutIFPAnimations, RpClump * pClump, CAnimBlendAssocGroupSAInterface * pAnimAssocGroup, AnimationId animID )
4051
4051
{
4052
- printf (" AssocGroupCopyAnimationHandler called!\n " );
4053
4052
auto CAnimBlendStaticAssociation_Init = (hCAnimBlendStaticAssociation_Init)0x4CEC20 ;
4054
4053
4055
4054
bool isCustomAnimationToPlay = false ;
@@ -4059,10 +4058,14 @@ bool CClientGame::AssocGroupCopyAnimationHandler ( CAnimBlendStaticAssociationSA
4059
4058
CClientPed * pClientPed = GetClientPedByClump ( *pClump );
4060
4059
if ( pClientPed != nullptr )
4061
4060
{
4062
- auto pReplacedAnimHeirarchyInterface = pClientPed->getReplacedAnimation ( pOriginalAnimStaticAssoc->pAnimHeirarchy );
4063
- if ( pReplacedAnimHeirarchyInterface != nullptr )
4064
- { // Play our custom animation instead of default
4065
- CAnimBlendStaticAssociation_Init ( pOutAnimStaticAssoc, pClump, pReplacedAnimHeirarchyInterface );
4061
+ auto pReplacedAnimation = pClientPed->getReplacedAnimation ( pOriginalAnimStaticAssoc->pAnimHeirarchy );
4062
+ if ( pReplacedAnimation != nullptr )
4063
+ {
4064
+ SIFPAnimations * pIFPAnimations = pReplacedAnimation->pIFP ->GetIFPAnimationsPointer ();
4065
+ printf (" \n AssocGroupCopyAnimationHandler: pIFPAnimations: %p\n\n " , pIFPAnimations);
4066
+ // Play our custom animation instead of default
4067
+ *pOutIFPAnimations = pIFPAnimations;
4068
+ CAnimBlendStaticAssociation_Init ( pOutAnimStaticAssoc, pClump, pReplacedAnimation->pAnimationHierarchy );
4066
4069
isCustomAnimationToPlay = true ;
4067
4070
}
4068
4071
else
@@ -4082,7 +4085,7 @@ bool CClientGame::AssocGroupCopyAnimationHandler ( CAnimBlendStaticAssociationSA
4082
4085
pOutAnimStaticAssoc->nNumBlendNodes = pOriginalAnimStaticAssoc->nNumBlendNodes ;
4083
4086
pOutAnimStaticAssoc->sFlags = pOriginalAnimStaticAssoc->sFlags ;
4084
4087
4085
- printf (" CClientGame::AssocGroupCopyAnimationHandler: About to return!\n " );
4088
+ printf (" CClientGame::AssocGroupCopyAnimationHandler: About to return sAnimGroup: %d | sAnimID: %d !\n " , pOutAnimStaticAssoc-> sAnimGroup , pOutAnimStaticAssoc-> sAnimID );
4086
4089
return isCustomAnimationToPlay;
4087
4090
}
4088
4091
0 commit comments