Browse Source

Merge pull request #342 from Hoikas/ishuman

Fix pySceneObject::IsHuman
Michael Hansen 12 years ago
parent
commit
ae9b1cf2a4
  1. 9
      Sources/Plasma/FeatureLib/pfPython/pySceneObject.cpp

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

@ -613,10 +613,11 @@ bool pySceneObject::IsHumanAvatar()
plArmatureMod* avatar = (plArmatureMod*)plArmatureMod::ConvertNoRef(mod);
if ( avatar )
{
plArmatureBrain* brain = avatar->GetCurrentBrain();
plAvBrainHuman* human = plAvBrainHuman::ConvertNoRef(brain);
if ( human )
return true;
for (int i = 0; i < avatar->GetBrainCount(); ++i)
{
if (plAvBrainHuman::ConvertNoRef(avatar->GetBrain(i)))
return true;
}
}
}
}

Loading…
Cancel
Save