Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 8, 2009, 12:36:08 AM (16 years ago)
Author:
dafrick
Message:

Merging of the current QuestSystem branch.

Location:
code/branches/questsystem5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem5

  • code/branches/questsystem5/src/orxonox/objects/worldentities/WorldEntity.cc

    r2662 r2907  
    181181
    182182        // 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));
    184184    }
    185185
     
    188188        Network function that object this instance to its correct parent.
    189189    */
    190     void WorldEntity::parentChanged()
     190    void WorldEntity::networkcallback_parentChanged()
    191191    {
    192192        if (this->parentID_ != OBJECTID_UNKNOWN)
     
    362362        this->parentID_ = newParent->getObjectID();
    363363
     364        this->parentChanged();
     365
    364366        // apply transform to collision shape
    365367        this->collisionShape_->setPosition(this->getPosition());
    366368        this->collisionShape_->setOrientation(this->getOrientation());
    367369        // TODO: Scale
    368        
     370
    369371        return true;
    370372    }
     
    406408        this->parent_ = 0;
    407409        this->parentID_ = OBJECTID_UNKNOWN;
     410
     411        this->parentChanged();
    408412
    409413        // reset orientation of the collisionShape (cannot be set within a WE usually)
     
    488492
    489493    // Note: These functions are placed in WorldEntity.h as inline functions for the release build.
    490 #ifndef _NDEBUG
     494#ifndef NDEBUG
    491495    const Vector3& WorldEntity::getPosition() const
    492496    {
     
    656660        case TransformSpace::World:
    657661            ogreRelativeTo = Ogre::Node::TS_WORLD; break;
     662        default: OrxAssert(false, "Faulty TransformSpace::Enum assigned.");
    658663        }
    659664        this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector);
     
    755760        {
    756761        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);
    758763            break;
    759764        case Kinematic:
Note: See TracChangeset for help on using the changeset viewer.