Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9612


Ignore:
Timestamp:
Apr 1, 2013, 2:41:07 PM (12 years ago)
Author:
landauf
Message:

set the owner of a WorldEntityCollisionShape independent of the creator

Location:
code/branches/core6/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc

    r8706 r9612  
    3737namespace orxonox
    3838{
    39     WorldEntityCollisionShape::WorldEntityCollisionShape(WorldEntity* creator) : CompoundCollisionShape(creator)
     39    WorldEntityCollisionShape::WorldEntityCollisionShape(BaseObject* creator) : CompoundCollisionShape(creator)
    4040    {
    4141        RegisterObject(WorldEntityCollisionShape);
    4242
    43         this->worldEntityOwner_ = creator;
     43        this->worldEntityOwner_ = NULL;
    4444        // suppress synchronisation
    4545        this->setSyncMode(ObjectDirection::None);
  • code/branches/core6/src/orxonox/collisionshapes/WorldEntityCollisionShape.h

    r5781 r9612  
    3838    {
    3939        public:
    40             WorldEntityCollisionShape(WorldEntity* creator);
     40            WorldEntityCollisionShape(BaseObject* creator);
    4141            virtual ~WorldEntityCollisionShape();
    4242
    43             inline WorldEntity* getWorldEntityOwner()
     43            inline void setWorldEntityOwner(WorldEntity* worldEntityOwner)
     44                { this->worldEntityOwner_ = worldEntityOwner; }
     45            inline WorldEntity* getWorldEntityOwner() const
    4446                { return this->worldEntityOwner_; }
    4547
  • code/branches/core6/src/orxonox/worldentities/WorldEntity.cc

    r8858 r9612  
    9393        this->bPhysicsActiveBeforeAttaching_ = false;
    9494        this->collisionShape_ = new WorldEntityCollisionShape(this);
     95        this->collisionShape_->setWorldEntityOwner(this);
    9596        this->collisionType_             = None;
    9697        this->collisionTypeSynchronised_ = None;
Note: See TracChangeset for help on using the changeset viewer.