- Timestamp:
- Apr 8, 2009, 12:36:08 AM (16 years ago)
- Location:
- code/branches/questsystem5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5
- Property svn:mergeinfo changed
-
code/branches/questsystem5/src/orxonox/objects/worldentities/WorldEntity.cc
r2662 r2907 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) … … 488 492 489 493 // Note: These functions are placed in WorldEntity.h as inline functions for the release build. 490 #ifndef _NDEBUG494 #ifndef NDEBUG 491 495 const Vector3& WorldEntity::getPosition() const 492 496 { … … 656 660 case TransformSpace::World: 657 661 ogreRelativeTo = Ogre::Node::TS_WORLD; break; 662 default: OrxAssert(false, "Faulty TransformSpace::Enum assigned."); 658 663 } 659 664 this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector); … … 755 760 { 756 761 case Dynamic: 757 this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & ! (btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_KINEMATIC_OBJECT));762 this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT & !btCollisionObject::CF_KINEMATIC_OBJECT); 758 763 break; 759 764 case Kinematic:
Note: See TracChangeset
for help on using the changeset viewer.