Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2488


Ignore:
Timestamp:
Dec 16, 2008, 7:46:31 PM (16 years ago)
Author:
landauf
Message:

backlights work

Location:
code/branches/presentation/src/orxonox/objects
Files:
3 edited

Legend:

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

    r2485 r2488  
    154154
    155155        const Vector3& direction = this->getDirection();
    156         Vector3 velocity = this->ship_->getVelocity();
     156        Vector3 velocity = this->ship_->getLocalVelocity();
    157157        Vector3 acceleration = Vector3::ZERO;
    158158
  • code/branches/presentation/src/orxonox/objects/items/MultiStateEngine.cc

    r2485 r2488  
    9595
    9696                const Vector3& direction = this->getDirection();
    97                 const Vector3& velocity = this->getShip()->getVelocity();
     97                const Vector3& velocity = this->getShip()->getLocalVelocity();
    9898
    9999                bool forward = (direction.z < 0 && velocity.z < -FORWARD_EFFECT_VELOCITY_THRESHOLD);
     
    123123            }
    124124
    125             if (this->getShip()->hasLocalController() || Core::isMaster())
     125            if (Core::isMaster())
    126126            {
    127127                for (std::list<WorldEntity*>::const_iterator it = this->activeEffects_.begin(); it != this->activeEffects_.end(); ++it)
  • code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.h

    r2485 r2488  
    5454            inline const Vector3& getVelocity() const
    5555                { return this->linearVelocity_; }
     56            inline Vector3 getLocalVelocity() const
     57                { return (this->getOrientation().Inverse() * this->getVelocity()); }
    5658
    5759            virtual void setAngularVelocity(const Vector3& velocity);
Note: See TracChangeset for help on using the changeset viewer.