Changeset 2167 for code/branches
- Timestamp:
- Nov 9, 2008, 5:33:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.cc
r2162 r2167 59 59 60 60 this->parent_ = 0; 61 this->parentID_ = (unsigned int)-1;61 this->parentID_ = OBJECTID_UNKNOWN; 62 62 63 63 this->node_->setPosition(Vector3::ZERO); … … 108 108 void WorldEntity::updateParent() 109 109 { 110 WorldEntity* parent = dynamic_cast<WorldEntity*>(Synchronisable::getSynchronisable(this->parentID_)); 111 if (parent) 112 this->attachToParent(parent); 110 if (this->parentID_ != OBJECTID_UNKNOWN) 111 { 112 WorldEntity* parent = dynamic_cast<WorldEntity*>(Synchronisable::getSynchronisable(this->parentID_)); 113 if (parent) 114 this->attachToParent(parent); 115 } 113 116 } 114 117 … … 135 138 this->children_.erase(object); 136 139 object->parent_ = 0; 137 object->parentID_ = (unsigned int)-1;140 object->parentID_ = OBJECTID_UNKNOWN; 138 141 139 142 // this->getScene()->getRootSceneNode()->addChild(object->node_);
Note: See TracChangeset
for help on using the changeset viewer.