本文整理汇总了C++中PClassActor::GetReplacee方法的典型用法代码示例。如果您正苦于以下问题:C++ PClassActor::GetReplacee方法的具体用法?C++ PClassActor::GetReplacee怎么用?C++ PClassActor::GetReplacee使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PClassActor
的用法示例。
在下文中一共展示了PClassActor::GetReplacee方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
PClassActor *PClassActor::GetReplacee(bool lookskill)
{
FName skillrepname;
if (lookskill && AllSkills.Size() > (unsigned)gameskill)
{
skillrepname = AllSkills[gameskill].GetReplacedBy(TypeName);
if (skillrepname != NAME_None && PClass::FindClass(skillrepname) == NULL)
{
Printf("Warning: incorrect actor name in definition of skill %s: \n"
"non-existent class %s is replaced by class %s\n"
"Skill replacement will be ignored for this actor.\n",
AllSkills[gameskill].Name.GetChars(),
skillrepname.GetChars(), TypeName.GetChars());
AllSkills[gameskill].SetReplacedBy(TypeName, NAME_None);
AllSkills[gameskill].SetReplacement(skillrepname, NAME_None);
lookskill = false;
}
}
if (Replacee == NULL && (!lookskill || skillrepname == NAME_None))
{
return this;
}
// The Replacee field is temporarily NULLed to prevent
// potential infinite recursion.
PClassActor *savedrep = Replacee;
Replacee = NULL;
PClassActor *rep = savedrep;
if (lookskill && (skillrepname != NAME_None) && (PClass::FindClass(skillrepname) != NULL))
{
rep = PClass::FindActor(skillrepname);
}
rep = rep->GetReplacee(false);
Replacee = savedrep;
return rep;
}