Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2011, 12:04:42 AM (13 years ago)
Author:
dafrick
Message:

Converting tabs to spaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/bigships/src/orxonox/items/Engine.cc

    r8426 r8588  
    4747        this->ship_ = 0;
    4848        this->shipID_ = OBJECTID_UNKNOWN;
    49                 this->relativePosition_ = Vector3(0,0,0);
     49        this->relativePosition_ = Vector3(0,0,0);
    5050
    5151        this->boostFactor_ = 1.5;
     
    7272    Engine::~Engine()
    7373    {
    74         if (this->isInitialized() && this->ship_)
    75         {
    76             //this->ship_->setEngine(0);
    77 
    78             //if (this->boostBlur_)
    79             //    this->boostBlur_->destroy();
    80         }
     74
    8175    }
    8276
     
    9892        XMLPortParam(Engine, "accelerationupdown",    setAccelerationUpDown,    setAccelerationUpDown,    xmlelement, mode);
    9993
    100                 XMLPortParam(Engine, "position", setRelativePosition, getRelativePosition, xmlelement, mode);
    101                 XMLPortParam(Engine, "template", setEngineTemplate, getEngineTemplate, xmlelement, mode);
     94        XMLPortParam(Engine, "position", setRelativePosition, getRelativePosition, xmlelement, mode);
     95        XMLPortParam(Engine, "template", setEngineTemplate, getEngineTemplate, xmlelement, mode);
    10296    }
    10397
     
    199193        }
    200194
    201                 // NOTE: Bullet always uses global coordinates.
     195        // NOTE: Bullet always uses global coordinates.
    202196        this->ship_->addAcceleration(this->ship_->getOrientation() * (acceleration*this->getSpeedMultiply()+Vector3(0,0,-this->getSpeedAdd())), this->ship_->getOrientation() * this->relativePosition_);
    203197
    204 
    205                 // Hack to reset a temporary variable "direction"
    206                 this->ship_->oneEngineTickDone();
    207                 if(!this->ship_->hasEngineTicksRemaining())
    208                 {
    209                         this->ship_->setSteeringDirection(Vector3::ZERO);
    210                         this->ship_->resetEngineTicks();
    211                 }
     198        // Hack to reset a temporary variable "direction"
     199        this->ship_->oneEngineTickDone();
     200        if(!this->ship_->hasEngineTicksRemaining())
     201        {
     202            this->ship_->setSteeringDirection(Vector3::ZERO);
     203            this->ship_->resetEngineTicks();
     204        }
    212205    }
    213206
     
    247240    }
    248241
    249         void Engine::loadEngineTemplate()
    250         {
    251                 if(!this->engineTemplate_.empty())
    252                 {
    253                         COUT(4)<<"Loading an engine template: "<<this->engineTemplate_<<"\n";
    254                         Template *temp = Template::getTemplate(this->engineTemplate_);
    255                         if(temp)
    256                         {
    257                                 this->addTemplate(temp);
    258                         }
    259                 }
    260         }
     242    void Engine::loadEngineTemplate()
     243    {
     244        if(!this->engineTemplate_.empty())
     245        {
     246            COUT(4)<<"Loading an engine template: "<<this->engineTemplate_<<"\n";
     247            Template *temp = Template::getTemplate(this->engineTemplate_);
     248            if(temp)
     249            {
     250                this->addTemplate(temp);
     251            }
     252        }
     253    }
    261254}
Note: See TracChangeset for help on using the changeset viewer.