- Timestamp:
- Apr 8, 2009, 12:58:47 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
r2907 r2908 181 181 182 182 // Attach to parent if necessary 183 registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity:: networkcallback_parentChanged));183 registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::parentChanged)); 184 184 } 185 185 … … 188 188 Network function that object this instance to its correct parent. 189 189 */ 190 void WorldEntity:: networkcallback_parentChanged()190 void WorldEntity::parentChanged() 191 191 { 192 192 if (this->parentID_ != OBJECTID_UNKNOWN) … … 362 362 this->parentID_ = newParent->getObjectID(); 363 363 364 this->parentChanged();365 366 364 // apply transform to collision shape 367 365 this->collisionShape_->setPosition(this->getPosition()); 368 366 this->collisionShape_->setOrientation(this->getOrientation()); 369 367 // TODO: Scale 370 368 371 369 return true; 372 370 } … … 408 406 this->parent_ = 0; 409 407 this->parentID_ = OBJECTID_UNKNOWN; 410 411 this->parentChanged();412 408 413 409 // reset orientation of the collisionShape (cannot be set within a WE usually) … … 492 488 493 489 // Note: These functions are placed in WorldEntity.h as inline functions for the release build. 494 #ifndef NDEBUG490 #ifndef _NDEBUG 495 491 const Vector3& WorldEntity::getPosition() const 496 492 { … … 660 656 case TransformSpace::World: 661 657 ogreRelativeTo = Ogre::Node::TS_WORLD; break; 662 default: OrxAssert(false, "Faulty TransformSpace::Enum assigned.");663 658 } 664 659 this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector); … … 760 755 { 761 756 case Dynamic: 762 this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & ! btCollisionObject::CF_STATIC_OBJECT & !btCollisionObject::CF_KINEMATIC_OBJECT);757 this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !(btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_KINEMATIC_OBJECT)); 763 758 break; 764 759 case Kinematic:
Note: See TracChangeset
for help on using the changeset viewer.