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); plArmatureMod* avatar = (plArmatureMod*)plArmatureMod::ConvertNoRef(mod);
if ( avatar ) if ( avatar )
{ {
plArmatureBrain* brain = avatar->GetCurrentBrain(); for (int i = 0; i < avatar->GetBrainCount(); ++i)
plAvBrainHuman* human = plAvBrainHuman::ConvertNoRef(brain); {
if ( human ) if (plAvBrainHuman::ConvertNoRef(avatar->GetBrain(i)))
return true; return true;
} }
} }
} }
} }
}
// if we couldn't find any sceneobject that had an avatar mod then this ain't an avatar // if we couldn't find any sceneobject that had an avatar mod then this ain't an avatar
return false; return false;
} }

Loading…
Cancel
Save