Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3838 in orxonox.OLD for orxonox/trunk/src


Ignore:
Timestamp:
Apr 15, 2005, 6:30:08 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: finished reworking of trackManager. Now we have to find the Bug…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/track_manager.cc

    r3837 r3838  
    615615   \param trackIDs A Pointer to an Array of ints which will hold the trackID's (the user will have to reserve space for this).
    616616   \param trackElem The TrackElement to appy this to. (if NULL chose this->currentTrackElement)
     617   \see TrackManager::fork(unsigned int count, ...)
    617618*/
    618619void TrackManager::forkV(unsigned int count, int* trackIDs, TrackElement* trackElem)
     
    684685}
    685686
    686 
    687687/**
    688688   \brief joins some tracks together again.
     
    720720  TrackElement* tmpTrackElem = this->firstTrackElem->findByID(trackIDs[0]);
    721721  if (!tmpTrackElem->backLoopCheck(tmpTrackElem))
    722     PRINTF(2)("Backloop connection detected at joining trackElements\n");
    723 
    724   // chanching work-on to temporary value. going back at the end.
    725   int tmpCurrentWorkingID = this->currentTrackElem->ID;
    726   this->workOn(trackIDs[0]);
    727   TrackElement* firstJoint = this->currentTrackElem;
     722    {
     723      PRINTF(2)("Backloop connection detected at joining trackElements\n -> TRACK WILL NOT BE JOINED\n");
     724      return;
     725    }
     726
     727  TrackElement* firstJoint =   this->firstTrackElem->findByID(trackIDs[0]);
    728728  float tmpLatestTime = firstJoint->endTime;
    729729
     
    734734  //  firstJoint->mainJoin = true;
    735735  if(!firstJoint->isHotPoint)
    736     this->setSavePoint();
     736    this->setSavePoint(firstJoint);
    737737  // Timing:
    738738  for (int i = 0; i < count; i++)
     
    769769        }
    770770    }
    771   if(firstJoint->childCount > 0)
     771  if(firstJoint->children)
    772772    {
    773773      //TrackElement* enumElem = firstJoint->children->enumerate();
     
    776776      while (enumElem)
    777777        {
    778           PRINTF(4)("Setting startingTime of %d to %f.\n", enumElem->ID, tmpLatestTime);
     778          PRINTF(5)("Setting startingTime of %d to %f.\n", enumElem->ID, tmpLatestTime);
    779779          enumElem->startingTime = tmpLatestTime;
    780780          enumElem->endTime = tmpLatestTime + enumElem->duration;
     
    784784      delete iterator;
    785785    }
    786   // returning to the TrackElement we were working on.
    787   this->workOn(tmpCurrentWorkingID);
    788786}
    789787
     
    828826        }
    829827    }
    830   for (int i = 1; i <=trackElemCount;i++)
     828  for (int i = 1; i <= trackElemCount;i++)
    831829    if (this->firstTrackElem->findByID(i)->endTime > this->maxTime)
    832830      this->maxTime = this->firstTrackElem->findByID(i)->endTime; // very bad implemented :/
Note: See TracChangeset for help on using the changeset viewer.