Skip to content

Commit ceb5663

Browse files
committed
correct CClientPed * is returned from GetClientPedFromClumpMap to check to whom the clump belongs and what animation to play, it can be a custom animation as well.
1 parent c931b4c commit ceb5663

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Client/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3985,10 +3985,15 @@ bool CClientGame::ChokingHandler ( unsigned char ucWeaponType )
39853985

39863986
CAnimBlendAssociationSAInterface * CClientGame::AddAnimationHandler ( RpClump * pClump, AssocGroupId animGroup, AnimationId animID )
39873987
{
3988-
printf ( "AddAnimationHandler called! GroupID, AnimID: %d, %d\n", animGroup, animID );
3988+
printf ( "AddAnimationHandler called! pClump, GroupID, AnimID: %p, %d, %d\n", (void*)pClump, animGroup, animID );
39893989

39903990
//CClientPed * pPed = m_pPedManager->Get ( pClump, true );
3991-
3991+
CClientPed * pClientPed = g_pGame->GetAnimManager()->GetClientPedFromClumpMap ( pClump );
3992+
if ( pClientPed != nullptr )
3993+
{
3994+
printf ("pClientPed found!\n");
3995+
}
3996+
39923997
std::unique_ptr < CAnimBlendAssocGroup > pAnimAssocGroup = g_pGame->CreateAnimBlendAssocGroup ( animGroup );
39933998
CAnimBlendAssociationSAInterface * pAnimAssociation = pAnimAssocGroup->CopyAnimation ( animID );
39943999

0 commit comments

Comments
 (0)