BGE: Fix T41299 Group API for child object in dupli instance group.
This commit is contained in:
@@ -809,13 +809,6 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level)
|
|||||||
// we can now add the graphic controller to the physic engine
|
// we can now add the graphic controller to the physic engine
|
||||||
replica->ActivateGraphicController(true);
|
replica->ActivateGraphicController(true);
|
||||||
|
|
||||||
// set references for dupli-group
|
|
||||||
// groupobj holds a list of all objects, that belongs to this group
|
|
||||||
groupobj->AddInstanceObjects(replica);
|
|
||||||
|
|
||||||
// every object gets the reference to its dupli-group object
|
|
||||||
replica->SetDupliGroupObject(groupobj);
|
|
||||||
|
|
||||||
// done with replica
|
// done with replica
|
||||||
replica->Release();
|
replica->Release();
|
||||||
}
|
}
|
||||||
@@ -826,6 +819,14 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level)
|
|||||||
for (git = m_logicHierarchicalGameObjects.begin(); git != m_logicHierarchicalGameObjects.end(); ++git) {
|
for (git = m_logicHierarchicalGameObjects.begin(); git != m_logicHierarchicalGameObjects.end(); ++git) {
|
||||||
KX_GameObject *gameobj = *git;
|
KX_GameObject *gameobj = *git;
|
||||||
|
|
||||||
|
if (gameobj->GetBlenderGroupObject() == blgroupobj) {
|
||||||
|
// set references for dupli-group
|
||||||
|
// groupobj holds a list of all objects, that belongs to this group
|
||||||
|
groupobj->AddInstanceObjects(gameobj);
|
||||||
|
// every object gets the reference to its dupli-group object
|
||||||
|
gameobj->SetDupliGroupObject(groupobj);
|
||||||
|
}
|
||||||
|
|
||||||
gameobj->ReParentLogic();
|
gameobj->ReParentLogic();
|
||||||
|
|
||||||
// relink any pointers as necessary, sort of a temporary solution
|
// relink any pointers as necessary, sort of a temporary solution
|
||||||
|
Reference in New Issue
Block a user