Skip to content

Commit dba18b6

Browse files
committed
Animation is copied using CopyAnimation function and the result is returned by AddAnimationHandler
1 parent 3771953 commit dba18b6

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

Client/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "StdInc.h"
2626
#include <net/SyncStructures.h>
27+
#include <../Client/game_sa/CAnimBlendAssocGroupSA.h>
2728

2829
SString StringZeroPadout ( const SString& strInput, uint uiPadoutSize )
2930
{
@@ -3690,9 +3691,9 @@ bool CClientGame::StaticChokingHandler ( unsigned char ucWeaponType )
36903691
return g_pClientGame->ChokingHandler ( ucWeaponType );
36913692
}
36923693

3693-
void CClientGame::StaticAddAnimationHandler ( RpClump * pClump, AssocGroupId animGroup, AnimationId animID )
3694+
CAnimBlendAssociation * CClientGame::StaticAddAnimationHandler ( RpClump * pClump, AssocGroupId animGroup, AnimationId animID )
36943695
{
3695-
g_pClientGame->AddAnimationHandler ( pClump, animGroup, animID );
3696+
return g_pClientGame->AddAnimationHandler ( pClump, animGroup, animID );
36963697
}
36973698

36983699
void CClientGame::StaticBlendAnimationHandler ( RpClump * pClump, AssocGroupId animGroup, AnimationId animID, float fBlendDelta )
@@ -3981,10 +3982,23 @@ bool CClientGame::ChokingHandler ( unsigned char ucWeaponType )
39813982
return m_pLocalPlayer->CallEvent ( "onClientPlayerChoke", Arguments, true );
39823983
}
39833984

3984-
3985-
void CClientGame::AddAnimationHandler ( RpClump * pClump, AssocGroupId animGroup, AnimationId animID )
3985+
CAnimBlendAssociation * CClientGame::AddAnimationHandler ( RpClump * pClump, AssocGroupId animGroup, AnimationId animID )
39863986
{
3987+
printf ( "AddAnimationHandler called! GroupID, AnimID: %d, %d\n", animGroup, animID );
3988+
39873989
//CClientPed * pPed = m_pPedManager->Get ( pClump, true );
3990+
3991+
hCAnimBlendAssocGroup_CopyAnimation CAnimBlendAssocGroup_CopyAnimation = reinterpret_cast < hCAnimBlendAssocGroup_CopyAnimation > ( FUNC_CAnimBlendAssocGroup_CopyAnimation );
3992+
3993+
CAnimBlendAssocGroupSAInterface * pAnimAssocGroup = reinterpret_cast < CAnimBlendAssocGroupSAInterface * > ( ((DWORD*)*(DWORD*)0x00B4EA34) + (5 * animGroup) );
3994+
CAnimBlendAssociation * pAnimAssociation = CAnimBlendAssocGroup_CopyAnimation ( pAnimAssocGroup, animID );
3995+
3996+
3997+
//CAnimBlendAssociation * pAnimAssociation = CAnimBlendAssocGroup_CopyAnimation ( pAnimAssocGroupInterface, animID );
3998+
//CAnimBlendAssocGroupSA pAssocGroupSA ( pAnimAssocGroupInterface );
3999+
//CAnimBlendAssociation * pAnimAssociation = pAssocGroupSA.CopyAnimation ( animID );
4000+
4001+
return pAnimAssociation;
39884002
}
39894003

39904004
void CClientGame::BlendAnimationHandler ( RpClump * pClump, AssocGroupId animGroup, AnimationId animID, float fBlendDelta )

0 commit comments

Comments
 (0)