Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7077


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

delete → destroy()

Location:
code/branches/presentation3/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/modules/designtools/CreateStars.cc

    r7039 r7077  
    3434#include "core/XMLPort.h"
    3535#include "graphics/Billboard.h"
    36  
     36
    3737namespace orxonox
    3838{
     
    5656    CreateStars::~CreateStars()
    5757    {
    58         while( billboards_.size()!=0 ) 
     58        while( billboards_.size()!=0 )
    5959        {
    60             delete(billboards_.back());
     60            billboards_.back()->destroy();
    6161            billboards_.pop_back();
    6262
     
    6969    {
    7070
    71         for(int i=0; i < numStars_; i++) 
     71        for(int i=0; i < numStars_; i++)
    7272        {
    7373            Billboard* bb = new Billboard(this);
     
    8888            float teta;
    8989
    90             while(1) 
     90            while(1)
    9191            {
    9292                phi = rnd(2*pi);
     
    101101    }
    102102
    103     Vector3 CreateStars::PolarToCartesian(float phi, float teta, float radius) 
     103    Vector3 CreateStars::PolarToCartesian(float phi, float teta, float radius)
    104104    {
    105105        float x = radius * cos(phi) * sin(teta);
  • 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.