Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 2, 2010, 1:52:21 AM (14 years ago)
Author:
landauf
Message:

delete → destroy()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/orxonox/worldentities/Drone.cc

    r7060 r7077  
    4444
    4545        this->myController_ = 0;
    46        
     46
    4747        this->localLinearAcceleration_.setValue(0, 0, 0);
    4848        this->localAngularAcceleration_.setValue(0, 0, 0);
    4949        this->setRadarVisibility(false);
    5050        this->setCollisionType(WorldEntity::Dynamic);
    51        
     51
    5252        myController_ = new DroneController(static_cast<BaseObject*>(this)); //!< Creates a new controller and passes our this pointer to it as creator.
    5353        myController_->setDrone(this);
     
    6363    {
    6464        if( this->isInitialized() && this->myController_ )
    65             delete this->myController_;
     65            this->myController_->destroy();
    6666    }
    6767
     
    9292    {
    9393        SUPER(Drone, tick, dt);
    94        
     94
    9595        //if (this->hasLocalController())
    9696        //{
     
    103103            this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
    104104            this->localLinearAcceleration_.setValue(0, 0, 0);
    105        
     105
    106106            this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_;
    107107            this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
     
    109109        //}
    110110    }
    111    
     111
    112112    /**
    113113    @brief
     
    175175        this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
    176176    }
    177    
     177
    178178}
Note: See TracChangeset for help on using the changeset viewer.