Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10449 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Jan 28, 2007, 5:46:16 PM (18 years ago)
Author:
patrick
Message:

drawing track is now loadable, merge from branche playability

Location:
trunk/src/world_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/camera.cc

    r10410 r10449  
    231231void Camera::draw() const
    232232{
    233   if( this->entityTrack != NULL)
     233  if( this->entityTrack != NULL && this->isDrawTrack())
    234234    this->entityTrack->drawGraph();
    235235}
  • trunk/src/world_entities/npcs/npc.cc

    r10448 r10449  
    271271void NPC::draw() const
    272272{
     273 if( this->entityTrack != NULL && this->isDrawTrack())
     274  this->entityTrack->drawGraph();
     275
    273276 WorldEntity::draw();
    274   if( this->entityTrack != NULL)
    275     this->entityTrack->drawGraph();
    276 }
     277}
  • trunk/src/world_entities/space_ships/space_ship.cc

    r10420 r10449  
    490490void SpaceShip::draw () const
    491491{
    492   if( this->entityTrack != NULL)
     492  if( this->entityTrack != NULL && this->isDrawTrack())
    493493    this->entityTrack->drawGraph();
    494494
  • trunk/src/world_entities/world_entity.cc

    r10391 r10449  
    9494  // Track of this entity
    9595  this->entityTrack = NULL;
     96  this->bDrawTrack = false;
    9697
    9798  // registering default reactions:
     
    168169  LoadParam(root, "list", this, WorldEntity, toListS);
    169170
     171  LoadParam(root, "drawTrack", this, WorldEntity, drawDebugTrack)
     172      .describe("draws the track for debugging purposes");
    170173
    171174  // Track
  • trunk/src/world_entities/world_entity.h

    r10391 r10449  
    185185    //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
    186186
     187  inline void drawDebugTrack(int flag) { this->bDrawTrack = (bool)flag; }
     188  inline bool isDrawTrack() const { return this->bDrawTrack; }
     189
    187190
    188191private:
     
    240243  Vector                  velocity;                        //!< speed of the entity
    241244  Track*                  entityTrack;                     //!< this is the track this entity follows (or NULL if none)
     245  bool                    bDrawTrack;                      //!< if true draws the debug track
    242246
    243247};
Note: See TracChangeset for help on using the changeset viewer.