Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10498 in orxonox.OLD for trunk/src/util/track


Ignore:
Timestamp:
Jan 30, 2007, 11:10:09 AM (17 years ago)
Author:
bknecht
Message:

use pauseCamera in scripts to pause the track of the camera. this works also with pause on NPCs and spaceships with tracks

Location:
trunk/src/util/track
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/track/track.cc

    r10454 r10498  
    142142     this->mode = newMode;
    143143}
     144
     145/**
     146 * Sets the bool if the track runs (false) or not (true)
     147 */
     148void Track::pauseTrack(bool stop)
     149{
     150     this->pause = stop;
     151}
     152
    144153
    145154/**
     
    250259       {
    251260          float newDt = dt * ratio;
     261          if(this->pause)
     262            newDt = 0;
    252263          this->localTime = oldTime += newDt;
    253264       }
  • trunk/src/util/track/track.h

    r10454 r10498  
    2727   void setSpeed(float speed);
    2828   void setMode(int newMode);
     29   void pauseTrack(bool stop);
    2930
    3031   //void finalize();
     
    5556   PNode*               trackNode;              //!< The node that is slave to the Track. This node will be moved while update the Track, and must NOT move itself.
    5657   int                  mode;                   //!< Defines the behaviour of the Track.
     58   bool                 pause;                  //!< Defines if the track runs (false) or not (true)
    5759};
    5860
Note: See TracChangeset for help on using the changeset viewer.