Changeset 7937
- Timestamp:
- Feb 20, 2011, 6:06:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/worldentities/WorldEntity.cc
r7910 r7937 123 123 while ((it = this->children_.begin()) != this->children_.end()) 124 124 { 125 WorldEntity* entity = *it; 126 125 127 // do this for all children, because even if getDeleteWithParent() returns true a child might still stay active due to smart pointers pointing to it 126 (*it)->setPosition((*it)->getWorldPosition());127 this->detach( *it); // detach also erases the element from the children set128 129 if ( (*it)->getDeleteWithParent())130 (*it)->destroy();128 entity->setPosition(entity->getWorldPosition()); 129 this->detach(entity); // detach also erases the element from the children set 130 131 if (entity->getDeleteWithParent()) 132 entity->destroy(); 131 133 } 132 134
Note: See TracChangeset
for help on using the changeset viewer.