Browse Source

Fix pySceneObject::IsHuman

Adam Johnson 11 years ago
parent
commit
139730eaab
  1. 7
      Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp

7
Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp

@ -613,14 +613,15 @@ bool pySceneObject::IsHumanAvatar()
plArmatureMod* avatar = (plArmatureMod*)plArmatureMod::ConvertNoRef(mod);
if ( avatar )
{
plArmatureBrain* brain = avatar->GetCurrentBrain();
plAvBrainHuman* human = plAvBrainHuman::ConvertNoRef(brain);
if ( human )
for (int i = 0; i < avatar->GetBrainCount(); ++i)
{
if (plAvBrainHuman::ConvertNoRef(avatar->GetBrain(i)))
return true;
}
}
}
}
}
// if we couldn't find any sceneobject that had an avatar mod then this ain't an avatar
return false;
}

Loading…
Cancel
Save