BGE patch: support for partial hierarchy in dupligroup instantiation; removal of links that point to inactive objects during group instantiation.
This situation corresponds to a group containing only a portion of a parent hierarchy (the Apricot team needed that to avoid logic duplication). The BGE will instantiate only the children that are in the group so that it follows the 3D view more closely. As a result, the logic links to the objects in the portion of the hierarchy that was not replicated will point to inactive objects (if the groups are stored in inactive layers as they should be). To keep the logic system consistent, these links are automatically removed. This last part of the patch is a general fix that could go in 2.47 but as this situation does not normally occurs in pre-2.47 games, it is not needed.
This commit is contained in:
@@ -104,7 +104,7 @@ SetSGClientObject(
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
bool
|
||||
SG_IObject::
|
||||
ActivateReplicationCallback(
|
||||
SG_IObject *replica
|
||||
@@ -112,8 +112,10 @@ ActivateReplicationCallback(
|
||||
if (m_callbacks.m_replicafunc)
|
||||
{
|
||||
// Call client provided replication func
|
||||
m_callbacks.m_replicafunc(replica,m_SGclientObject,m_SGclientInfo);
|
||||
if (m_callbacks.m_replicafunc(replica,m_SGclientObject,m_SGclientInfo) == NULL)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user