Sources/CryGame C++/Solution1/CryGame/XPlayerCamera.cpp
//////////////////////////////////////////////////////////////////////////
//so not to do GetBoneByName every frame

so not to do GetBoneByName every frame
so not to do GetBoneByName every frame
bool CPlayer::UpdateBonesPtrs( )
{
	ICryCharInstance *pChar = m_pEntity->GetCharInterface()->GetCharacter(0);
	if (pChar && pChar != m_pLastUsedCharacter)
	{
		m_pLastUsedCharacter = pChar;
		m_pBoneHead = pChar->GetBoneByName("Bip01 Head"); 
		m_pBoneNeck = pChar->GetBoneByName("Bip01 Neck"); 
		m_pBoneSpine = pChar->GetBoneByName("Bip01 Spine"); 
		m_pBoneSpine1 = pChar->GetBoneByName("Bip01 Spine1"); 
		m_pBoneSpine2 = pChar->GetBoneByName("Bip01 Spine2"); 
		return true;
	}
	return false;
}
bool CPlayer :: UpdateBonesPtrs ( ) { ICryCharInstance * pChar = m_pEntity -> GetCharInterface ( ) -> GetCharacter ( 0 ) ; if ( pChar && pChar != m_pLastUsedCharacter ) { m_pLastUsedCharacter = pChar ; m_pBoneHead = pChar -> GetBoneByName ( " " ) ; m_pBoneNeck = pChar -> GetBoneByName ( " " ) ; m_pBoneSpine = pChar -> GetBoneByName ( " " ) ; m_pBoneSpine1 = pChar -> GetBoneByName ( " " ) ; m_pBoneSpine2 = pChar -> GetBoneByName ( " " ) ; return true ; } return false ; }
so not to do GetBoneByName every frame
so not to do GetBoneByName every frame
// find bone in the list of bones;
 // find bone in the list of bones		
 // find bone in the list of bones		
 // find bone in the list of bones		
 // find bone in the list of bones		
