- Timestamp:
- Mar 26, 2009, 11:59:39 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc
r2787 r2851 181 181 182 182 // Attach to parent if necessary 183 registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity:: parentChanged));183 registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged)); 184 184 } 185 185 … … 188 188 Network function that object this instance to its correct parent. 189 189 */ 190 void WorldEntity:: parentChanged()190 void WorldEntity::networkcallback_parentChanged() 191 191 { 192 192 if (this->parentID_ != OBJECTID_UNKNOWN) … … 362 362 this->parentID_ = newParent->getObjectID(); 363 363 364 this->parentChanged(); 365 364 366 // apply transform to collision shape 365 367 this->collisionShape_->setPosition(this->getPosition()); 366 368 this->collisionShape_->setOrientation(this->getOrientation()); 367 369 // TODO: Scale 368 370 369 371 return true; 370 372 } … … 406 408 this->parent_ = 0; 407 409 this->parentID_ = OBJECTID_UNKNOWN; 410 411 this->parentChanged(); 408 412 409 413 // reset orientation of the collisionShape (cannot be set within a WE usually)
Note: See TracChangeset
for help on using the changeset viewer.