Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Ketsji/KX_Scene.cpp
| Context not available. | |||||
| // now look if object in the hierarchy have dupli group and recurse | // now look if object in the hierarchy have dupli group and recurse | ||||
| for (git = m_logicHierarchicalGameObjects.begin();!(git==m_logicHierarchicalGameObjects.end());++git) | for (git = m_logicHierarchicalGameObjects.begin();!(git==m_logicHierarchicalGameObjects.end());++git) | ||||
| { | { | ||||
| // replicate all constraints | |||||
| if ((*git)->GetPhysicsController()) { | |||||
sybren: Storing `(*git)->GetPhysicsController()` in a temporary variable may increase readability. | |||||
| (*git)->GetPhysicsController()->ReplicateConstraints((*git), m_logicHierarchicalGameObjects); | |||||
| (*git)->ClearConstraints(); | |||||
| } | |||||
| if ((*git) != groupobj && (*git)->IsDupliGroup()) | if ((*git) != groupobj && (*git)->IsDupliGroup()) | ||||
| // can't instantiate group immediately as it destroys m_logicHierarchicalGameObjects | // can't instantiate group immediately as it destroys m_logicHierarchicalGameObjects | ||||
| duplilist.push_back((*git)); | duplilist.push_back((*git)); | ||||
| Context not available. | |||||
Not Done Inline ActionsShouldn't this be handled in NewRemoveObject? I would think we could get a crash if something tries to reference constraints before the rest of the object is deleted at the end of the frame. moguri: Shouldn't this be handled in NewRemoveObject? I would think we could get a crash if something… | |||||
Not Done Inline ActionsIn a earlier version had done this. But this was producing some kind of bug. hg1: In a earlier version had done this. But this was producing some kind of bug.
I can't remember… | |||||
Storing (*git)->GetPhysicsController() in a temporary variable may increase readability.