Skip to content

Commit b0157a8

Browse files
committed
Animation name is now checked in engineLoadIFP whether the hierarchy exists or not
1 parent d153d3b commit b0157a8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,8 +2142,9 @@ bool CStaticFunctionDefinitions::SetPedAnimation ( CClientEntity& Entity, const
21422142
{
21432143
// Play the gateway animation
21442144
const SString & strGateWayBlockName = g_pGame->GetAnimManager()->GetGateWayBlockName ( );
2145-
CAnimBlock * pBlock = g_pGame->GetAnimManager ()->GetAnimationBlock ( strGateWayBlockName );
2146-
if ( pBlock )
2145+
CAnimBlock * pBlock = g_pGame->GetAnimManager ()->GetAnimationBlock ( strGateWayBlockName );
2146+
auto pCustomAnimBlendHierarchy = pIFP->GetAnimationHierarchy ( szAnimName );
2147+
if ( ( pBlock ) && ( pCustomAnimBlendHierarchy != nullptr ) )
21472148
{
21482149
Ped.setNextAnimationCustom ( szBlockName, szAnimName );
21492150

0 commit comments

Comments
 (0)