- Timestamp:
- May 25, 2009, 11:16:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc
r2855 r3077 69 69 this->parent_ = 0; 70 70 this->parentID_ = OBJECTID_UNKNOWN; 71 this->bDeleteWithParent_ = true; 71 72 72 73 this->node_->setPosition(Vector3::ZERO); … … 108 109 109 110 for (std::set<WorldEntity*>::const_iterator it = this->children_.begin(); it != this->children_.end(); ) 110 delete (*(it++)); 111 { 112 if ((*it)->getDeleteWithParent()) 113 delete (*(it++)); 114 else 115 { 116 this->detach(*it); 117 (*it)->setPosition(this->getWorldPosition()); 118 ++it; 119 } 120 } 111 121 112 122 if (this->physicalBody_) … … 138 148 XMLPortParamLoadOnly(WorldEntity, "pitch", pitch_xmlport, xmlelement, mode); 139 149 XMLPortParamLoadOnly(WorldEntity, "roll", roll_xmlport, xmlelement, mode); 150 XMLPortParam (WorldEntity, "deletewithparent", setDeleteWithParent, getDeleteWithParent, xmlelement, mode); 140 151 141 152 // Physics
Note: See TracChangeset
for help on using the changeset viewer.