Changeset 10449 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 28, 2007, 5:46:16 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/camera.cc
r10410 r10449 231 231 void Camera::draw() const 232 232 { 233 if( this->entityTrack != NULL )233 if( this->entityTrack != NULL && this->isDrawTrack()) 234 234 this->entityTrack->drawGraph(); 235 235 } -
trunk/src/world_entities/npcs/npc.cc
r10448 r10449 271 271 void NPC::draw() const 272 272 { 273 if( this->entityTrack != NULL && this->isDrawTrack()) 274 this->entityTrack->drawGraph(); 275 273 276 WorldEntity::draw(); 274 if( this->entityTrack != NULL) 275 this->entityTrack->drawGraph(); 276 } 277 } -
trunk/src/world_entities/space_ships/space_ship.cc
r10420 r10449 490 490 void SpaceShip::draw () const 491 491 { 492 if( this->entityTrack != NULL )492 if( this->entityTrack != NULL && this->isDrawTrack()) 493 493 this->entityTrack->drawGraph(); 494 494 -
trunk/src/world_entities/world_entity.cc
r10391 r10449 94 94 // Track of this entity 95 95 this->entityTrack = NULL; 96 this->bDrawTrack = false; 96 97 97 98 // registering default reactions: … … 168 169 LoadParam(root, "list", this, WorldEntity, toListS); 169 170 171 LoadParam(root, "drawTrack", this, WorldEntity, drawDebugTrack) 172 .describe("draws the track for debugging purposes"); 170 173 171 174 // Track -
trunk/src/world_entities/world_entity.h
r10391 r10449 185 185 // CharacterAttributes* charAttr; //!< the character attributes of a world_entity 186 186 187 inline void drawDebugTrack(int flag) { this->bDrawTrack = (bool)flag; } 188 inline bool isDrawTrack() const { return this->bDrawTrack; } 189 187 190 188 191 private: … … 240 243 Vector velocity; //!< speed of the entity 241 244 Track* entityTrack; //!< this is the track this entity follows (or NULL if none) 245 bool bDrawTrack; //!< if true draws the debug track 242 246 243 247 };
Note: See TracChangeset
for help on using the changeset viewer.