Ticket #178: Track.patch
File Track.patch, 6.1 KB (added by bensch, 19 years ago) |
---|
-
src/lib/math/curve.h
71 71 Curve* dirCurve; //!< The derivation-curve of this Curve. 72 72 73 73 std::list<PathNode> nodeList; //!< A list of all the Nodes of a Curve. 74 std::list<PathNode>::iterator nodeIterator; //!< An iterator that should point to the current Node75 74 PathNode* firstNode; //!< First node of the curve. 76 75 PathNode* currentNode; //!< The node we are working with (the Last node). 77 76 -
src/world_entities/world_entity.cc
184 184 void WorldEntity::addTrack(const TiXmlElement* root) 185 185 { 186 186 // The problem we have is most likely here. The track should be constructed WITH the XML-Code 187 /*this->entityTrack = new Track(root);187 this->entityTrack = new Track(root); 188 188 this->setParent(this->entityTrack->getTrackNode()); 189 this->entityTrack->getTrackNode()->setParentMode(PNODE_ALL); */189 this->entityTrack->getTrackNode()->setParentMode(PNODE_ALL); 190 190 /*LOAD_PARAM_START_CYCLE(root, element); 191 191 { 192 192 PRINTF(4)("element is: %s\n", element->Value()); … … 199 199 200 200 void WorldEntity::pauseTrack(bool stop) 201 201 { 202 /*if(this->entityTrack)203 this->entityTrack->pauseTrack(stop); */202 if(this->entityTrack) 203 this->entityTrack->pauseTrack(stop); 204 204 } 205 205 206 206 -
src/world_entities/test_entity.cc
85 85 this->toList(OM_GROUP_00); 86 86 87 87 //add to track 88 //if(this->entityTrack)89 //this->setParent(this->entityTrack->getTrackNode());88 if(this->entityTrack) 89 this->setParent(this->entityTrack->getTrackNode()); 90 90 91 91 } 92 92 … … 137 137 glPopAttrib(); 138 138 139 139 140 //if( this->entityTrack != NULL)141 //this->entityTrack->drawGraph();140 if( this->entityTrack != NULL) 141 this->entityTrack->drawGraph(); 142 142 143 143 } 144 144 … … 147 147 */ 148 148 void TestEntity::tick (float time) 149 149 { 150 //if(this->entityTrack)151 //this->entityTrack->tick(time);150 if(this->entityTrack) 151 this->entityTrack->tick(time); 152 152 153 153 154 154 } -
src/world_entities/space_ships/space_ship.cc
493 493 */ 494 494 void SpaceShip::draw () const 495 495 { 496 //if( this->entityTrack != NULL && this->isDrawTrack())497 //this->entityTrack->drawGraph();496 if( this->entityTrack != NULL && this->isDrawTrack()) 497 this->entityTrack->drawGraph(); 498 498 499 499 WorldEntity::draw(); 500 500 … … 550 550 this->secWeaponMan.releaseFire(); 551 551 552 552 // Tracktick 553 //if(this->entityTrack)554 //this->entityTrack->tick(time);553 if(this->entityTrack) 554 this->entityTrack->tick(time); 555 555 556 556 557 557 // Shield Regeneration and other regular calculations on the ship … … 867 867 868 868 this->isTravelDistanceInit = false; 869 869 870 //if(this->entityTrack)871 //this->travelNode->setParent(this->entityTrack->getTrackNode());870 if(this->entityTrack) 871 this->travelNode->setParent(this->entityTrack->getTrackNode()); 872 872 873 873 this->setParent(this->travelNode); 874 874 this->setRelCoor(0,0,0); -
src/world_entities/npcs/npc.cc
152 152 this->bFire = false; 153 153 if( this->entityTrack) 154 154 { 155 /* this->setParent(this->entityTrack->getTrackNode());*/ 155 this->setParent(this->entityTrack->getTrackNode()); 156 156 this->setRelCoor(0,0,0); 157 157 } 158 158 … … 426 426 } 427 427 this->bFire = false; 428 428 429 //if(this->entityTrack)430 //this->entityTrack->tick(dt);429 if(this->entityTrack) 430 this->entityTrack->tick(dt); 431 431 432 432 } 433 433 434 434 void NPC::draw() const 435 435 { 436 //if( this->entityTrack != NULL && this->isDrawTrack())437 //this->entityTrack->drawGraph();436 if( this->entityTrack != NULL && this->isDrawTrack()) 437 this->entityTrack->drawGraph(); 438 438 439 439 WorldEntity::draw(); 440 440 } -
src/world_entities/camera.cc
101 101 this->eventHandling = true; 102 102 103 103 //add to track 104 /*if(this->entityTrack)104 if(this->entityTrack) 105 105 { 106 106 this->setParent(this->entityTrack->getTrackNode()); 107 107 //this->setRelCoor(0,0,0); 108 } */108 } 109 109 } 110 110 111 111 /** … … 226 226 if(this->entityTrack) 227 227 { 228 228 //PRINTF(0)("tickytackytucky\n"); 229 /* this->entityTrack->tick(dt);*/ 229 this->entityTrack->tick(dt); 230 230 //this->setAbsCoor(this->entityTrack->getTrackNode()->getAbsCoor()); 231 231 } 232 232 … … 239 239 240 240 void Camera::draw() const 241 241 { 242 /*if( this->entityTrack != NULL && this->isDrawTrack())243 this->entityTrack->drawGraph(); */242 if( this->entityTrack != NULL && this->isDrawTrack()) 243 this->entityTrack->drawGraph(); 244 244 } 245 245 246 246 -
src/util/Makefile.am
23 23 \ 24 24 animation/animation3d.cc \ 25 25 animation/animation.cc \ 26 animation/animation_player.cc 26 animation/animation_player.cc \ 27 \ 28 track/pilot_node.cc \ 29 track/track.cc \ 30 track/track_manager.cc \ 31 track/track_node.cc 27 32 28 33 noinst_HEADERS = \ 29 34 object_manager.h \ … … 44 49 animation/animation3d.h \ 45 50 animation/animation.h \ 46 51 animation/animation_player.h \ 47 animation/t_animation.h 52 animation/t_animation.h \ 53 \ 54 track/pilot_node.h \ 55 track/track.h \ 56 track/track_manager.h \ 57 track/track_node.h 58