Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 25, 2008, 1:14:19 AM (16 years ago)
Author:
landauf
Message:

The SpaceShips HUD is working again (Speedbar and Radar)

Location:
code/branches/objecthierarchy2/src/orxonox/objects/items
Files:
2 edited

Legend:

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

    r2254 r2256  
    6464    Engine::~Engine()
    6565    {
     66        if (this->isInitialized() && this->ship_)
     67            this->ship_->setEngine(0);
    6668    }
    6769
     
    111113            Synchronisable* object = Synchronisable::getSynchronisable(this->shipID_);
    112114            if (object)
    113                 this->ship_ = dynamic_cast<SpaceShip*>(object);
     115                this->addToSpaceShip(dynamic_cast<SpaceShip*>(object));
    114116        }
    115117    }
     
    182184        this->ship_ = ship;
    183185        if (ship)
     186        {
    184187            this->shipID_ = ship->getObjectID();
     188            if (ship->getEngine() != this)
     189                ship->setEngine(this);
     190        }
    185191    }
    186192
  • code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.h

    r2254 r2256  
    7272                { this->maxSpeedUpDown_ = speed; }
    7373
     74            inline float getMaxSpeedFront() const
     75                { return this->maxSpeedFront_; }
     76            inline float getMaxSpeedBack() const
     77                { return this->maxSpeedBack_; }
     78            inline float getMaxSpeedLeftRight() const
     79                { return this->maxSpeedLeftRight_; }
     80            inline float getMaxSpeedUpDown() const
     81                { return this->maxSpeedUpDown_; }
     82
    7483            inline void setAccelerationFront(float acceleration)
    7584                { this->accelerationFront_ = acceleration; }
     
    8291            inline void setAccelerationUpDown(float acceleration)
    8392                { this->accelerationUpDown_ = acceleration; }
     93
     94            inline float getAccelerationFront() const
     95                { return this->accelerationFront_; }
     96            inline float getAccelerationBrake() const
     97                { return this->accelerationBrake_; }
     98            inline float getAccelerationBack() const
     99                { return this->accelerationBack_; }
     100            inline float getAccelerationLeftRight() const
     101                { return this->accelerationLeftRight_; }
     102            inline float getAccelerationUpDown() const
     103                { return this->accelerationUpDown_; }
    84104
    85105            virtual const Vector3& getDirection() const;
Note: See TracChangeset for help on using the changeset viewer.