Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ticket #178: Track.patch

File Track.patch, 6.1 KB (added by bensch, 19 years ago)

patch -i Track.patch -p0

  • src/lib/math/curve.h

     
    7171  Curve*                dirCurve;        //!< The derivation-curve of this Curve.
    7272
    7373  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 Node
    7574  PathNode*             firstNode;       //!< First node of the curve.
    7675  PathNode*             currentNode;     //!< The node we are working with (the Last node).
    7776
  • src/world_entities/world_entity.cc

     
    184184void WorldEntity::addTrack(const TiXmlElement* root)
    185185{
    186186  // 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);
    188188  this->setParent(this->entityTrack->getTrackNode());
    189   this->entityTrack->getTrackNode()->setParentMode(PNODE_ALL);*/
     189  this->entityTrack->getTrackNode()->setParentMode(PNODE_ALL);
    190190  /*LOAD_PARAM_START_CYCLE(root, element);
    191191  {
    192192    PRINTF(4)("element is: %s\n", element->Value());
     
    199199
    200200void WorldEntity::pauseTrack(bool stop)
    201201{
    202 /*     if(this->entityTrack)
    203        this->entityTrack->pauseTrack(stop);*/
     202     if(this->entityTrack)
     203       this->entityTrack->pauseTrack(stop);
    204204}
    205205
    206206
  • src/world_entities/test_entity.cc

     
    8585  this->toList(OM_GROUP_00);
    8686
    8787 //add to track
    88 //   if(this->entityTrack)
    89 //     this->setParent(this->entityTrack->getTrackNode());
     88  if(this->entityTrack)
     89    this->setParent(this->entityTrack->getTrackNode());
    9090
    9191}
    9292
     
    137137  glPopAttrib();
    138138
    139139
    140 // if( this->entityTrack != NULL)
    141 //     this->entityTrack->drawGraph();
     140if( this->entityTrack != NULL)
     141    this->entityTrack->drawGraph();
    142142
    143143}
    144144
     
    147147 */
    148148void TestEntity::tick (float time)
    149149{
    150 // if(this->entityTrack)
    151 //     this->entityTrack->tick(time);
     150 if(this->entityTrack)
     151    this->entityTrack->tick(time);
    152152
    153153
    154154}
  • src/world_entities/space_ships/space_ship.cc

     
    493493*/
    494494void SpaceShip::draw () const
    495495{
    496 //   if( this->entityTrack != NULL && this->isDrawTrack())
    497 //     this->entityTrack->drawGraph();
     496  if( this->entityTrack != NULL && this->isDrawTrack())
     497    this->entityTrack->drawGraph();
    498498
    499499  WorldEntity::draw();
    500500
     
    550550    this->secWeaponMan.releaseFire();
    551551
    552552  // Tracktick
    553 //   if(this->entityTrack)
    554 //     this->entityTrack->tick(time);
     553  if(this->entityTrack)
     554    this->entityTrack->tick(time);
    555555
    556556
    557557  // Shield Regeneration and other regular calculations on the ship
     
    867867
    868868        this->isTravelDistanceInit = false;
    869869
    870 //         if(this->entityTrack)
    871 //            this->travelNode->setParent(this->entityTrack->getTrackNode());
     870        if(this->entityTrack)
     871           this->travelNode->setParent(this->entityTrack->getTrackNode());
    872872
    873873        this->setParent(this->travelNode);
    874874        this->setRelCoor(0,0,0);
  • src/world_entities/npcs/npc.cc

     
    152152  this->bFire = false;
    153153  if( this->entityTrack)
    154154  {
    155 /*      this->setParent(this->entityTrack->getTrackNode());*/
     155      this->setParent(this->entityTrack->getTrackNode());
    156156      this->setRelCoor(0,0,0);
    157157  }
    158158
     
    426426  }
    427427  this->bFire = false;
    428428
    429 // if(this->entityTrack)
    430 //     this->entityTrack->tick(dt);
     429 if(this->entityTrack)
     430    this->entityTrack->tick(dt);
    431431
    432432}
    433433
    434434void NPC::draw() const
    435435{
    436 // if( this->entityTrack != NULL && this->isDrawTrack())
    437 //   this->entityTrack->drawGraph();
     436 if( this->entityTrack != NULL && this->isDrawTrack())
     437  this->entityTrack->drawGraph();
    438438
    439439 WorldEntity::draw();
    440440}
  • src/world_entities/camera.cc

     
    101101  this->eventHandling = true;
    102102
    103103  //add to track
    104 /*  if(this->entityTrack)
     104  if(this->entityTrack)
    105105   {
    106106    this->setParent(this->entityTrack->getTrackNode());
    107107    //this->setRelCoor(0,0,0);
    108    }*/
     108   }
    109109}
    110110
    111111/**
     
    226226  if(this->entityTrack)
    227227  {
    228228    //PRINTF(0)("tickytackytucky\n");
    229 /*    this->entityTrack->tick(dt);*/
     229    this->entityTrack->tick(dt);
    230230    //this->setAbsCoor(this->entityTrack->getTrackNode()->getAbsCoor());
    231231  }
    232232
     
    239239
    240240void Camera::draw() const
    241241{
    242 /*  if( this->entityTrack != NULL && this->isDrawTrack())
    243     this->entityTrack->drawGraph();*/
     242  if( this->entityTrack != NULL && this->isDrawTrack())
     243    this->entityTrack->drawGraph();
    244244}
    245245
    246246
  • src/util/Makefile.am

     
    2323                        \
    2424                        animation/animation3d.cc \
    2525                        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
    2732
    2833noinst_HEADERS =        \
    2934                        object_manager.h \
     
    4449                        animation/animation3d.h \
    4550                        animation/animation.h \
    4651                        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