|
|
|
@ -95,7 +95,7 @@ CAIAliasTranslator::~CAIAliasTranslator()
|
|
|
|
|
void CAIAliasTranslator::buildBotTree(const NLLIGO::IPrimitive* prim)
|
|
|
|
|
{
|
|
|
|
|
// look for bot nodes in the primitives
|
|
|
|
|
std::string value,name,aiClass;
|
|
|
|
|
std::string value, name, realName, aiClass;
|
|
|
|
|
if (prim->getPropertyByName("class",aiClass) )
|
|
|
|
|
{
|
|
|
|
|
if ( !nlstricmp(aiClass.c_str(),"npc_bot") ||!nlstricmp(aiClass.c_str(),"group_fauna") ||!nlstricmp(aiClass.c_str(),"npc_group") )
|
|
|
|
@ -117,6 +117,7 @@ void CAIAliasTranslator::buildBotTree(const NLLIGO::IPrimitive* prim)
|
|
|
|
|
nlwarning("<CAIAliasTranslator buildBotTree> errors : name='%s' alias='%s' in '%s'",name.c_str(),value.c_str(), buildPrimPath(prim).c_str());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
realName = name;
|
|
|
|
|
NLMISC::strlwr(name);
|
|
|
|
|
//remove AI name parameters
|
|
|
|
|
string::size_type trash = name.find('$');
|
|
|
|
@ -128,7 +129,7 @@ void CAIAliasTranslator::buildBotTree(const NLLIGO::IPrimitive* prim)
|
|
|
|
|
{
|
|
|
|
|
if ( !nlstricmp(aiClass.c_str(),"npc_bot") )
|
|
|
|
|
{
|
|
|
|
|
_BotIdsToNames.insert( make_pair(id,name) );
|
|
|
|
|
_BotIdsToNames.insert( make_pair(id,realName) );
|
|
|
|
|
_BotNamesToIds.insert( make_pair(name,id) );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|