static int BoneLookup(const clientInfo_t* ci, const char* name)
{
	if (!name) {
		name = "";
	}
	int idx = trap_R_BoneIndex(ci->bodyModel, name);
	if (idx < 0) {
		Log::Warn("Unknown bone name '%s' for model %s", name, ci->modelName);
	}
	return idx;
}
Пример #2
0
bool AnimDelta::ParseConfiguration(clientInfo_t* ci, const char* token2, const char** data_p)
{
	if ( Q_stricmp( token2, "handBones" ) ) return false;
	char* token = COM_Parse2( data_p );
	if ( !token || token[0] != '{' )
	{
		Log::Notice( "^1ERROR^7: Expected '{' but found '%s' in %s's character.cfg", token, ci->modelName );
		return false;
	}
	while ( 1 )
	{
		token = COM_Parse( data_p );
		if ( !token || token[0] == '}' ) break;
		int index = trap_R_BoneIndex( ci->bodyModel, token );
		if ( index < 0 )
		{
			Log::Warn("AnimDelta: Error finding bone '%s' in %s", token, ci->modelName );
		}
		boneIndicies_.push_back( index );
	}
	return true;
}