Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2008, 9:38:30 PM (15 years ago)
Author:
rgrieder
Message:

Changed the way setPosition, setVelocity, setOrientation and setAngularVelocity is handled in MobileEntity and upwards.
This allows to introduce a lost feature: Position of an enemy ship on the client can't be set anymore at all (local changes were allowed before).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics/src/orxonox/objects/worldentities/MovableEntity.cc

    r2421 r2427  
    2222 *   Author:
    2323 *      Fabian 'x3n' Landau
     24 *      Reto Grieder
    2425 *   Co-authors:
    2526 *      ...
     
    7677    }
    7778
    78     void MovableEntity::tick(float dt)
    79     {
    80         MobileEntity::tick(dt);
    81 
    82         if (this->isActive())
    83         {
    84         }
    85     }
    86 
    87     void MovableEntity::overwritePosition()
    88     {
    89         this->setPosition(this->overwrite_position_);
    90     }
    91 
    92     void MovableEntity::overwriteOrientation()
    93     {
    94         this->setOrientation(this->overwrite_orientation_);
    95     }
    96 
    9779    void MovableEntity::clientConnected(unsigned int clientID)
    9880    {
     
    10688    void MovableEntity::resynchronize()
    10789    {
    108         positionChanged(false);
    109         orientationChanged(false);
    110     }
    111 
    112     void MovableEntity::positionChanged(bool bContinuous)
    113     {
    114         if (!bContinuous)
    115             this->overwrite_position_ = this->getPosition();
    116     }
    117 
    118     void MovableEntity::orientationChanged(bool bContinuous)
    119     {
    120         if (!bContinuous)
    121             this->overwrite_orientation_ = this->getOrientation();
     90        this->overwrite_position_ = this->getPosition();
     91        this->overwrite_orientation_ = this->getOrientation();
    12292    }
    12393}
Note: See TracChangeset for help on using the changeset viewer.