start a character animation ///////////////////////////////////////////////////////////////////
| 1050 | //start a character animation |
| 1051 | //////////////////////////////////////////////////////////////////////// |
| 1052 | bool 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 | //////////////////////////////////////////////////////////////////////// |
no test coverage detected