MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / StartAnimation

Method StartAnimation

CryEntitySystem/EntityCreation.cpp:1052–1074  ·  view source on GitHub ↗

start a character animation ///////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1050//start a character animation
1051////////////////////////////////////////////////////////////////////////
1052bool CEntity::StartAnimation( int pos,const char *animation, int iLayerID, float fBlendTime, bool bStartWithLayer0Phase )
1053{
1054 CHECK_CHARACTER_SLOT_0( "CEntity::StartAnimation" );
1055
1056 if(m_pCryCharInstance[pos])
1057 {
1058 if( animation )
1059 {
1060 CryCharAnimationParams ccap;
1061 ccap.fBlendInTime = ccap.fBlendOutTime = fBlendTime;
1062 ccap.nLayerID = iLayerID;
1063 ccap.nFlags = bStartWithLayer0Phase ? ccap.FLAGS_SYNCHRONIZE_WITH_LAYER_0: 0 ;
1064 return m_pCryCharInstance[pos]->StartAnimation(animation,ccap);
1065// [PETAR] Historic call for reference:
1066// return m_pCryCharInstance[pos]->StartAnimation2(animation, fBlendTime, fBlendTime, iLayerID,
1067// true, bStartWithLayer0Phase);
1068 }
1069 else
1070 return m_pCryCharInstance[pos]->StopAnimation( iLayerID );
1071 }
1072
1073 return false;
1074}
1075
1076//force uapdate character
1077////////////////////////////////////////////////////////////////////////

Callers 1

LoadCharacterMethod · 0.45

Calls 1

StopAnimationMethod · 0.45

Tested by

no test coverage detected