Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3840 in orxonox.OLD for orxonox/trunk/src/track_manager.cc


Ignore:
Timestamp:
Apr 16, 2005, 11:35:33 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: preventing joining from join, IF and only if one trackElement is not found

File:
1 edited

Legend:

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

    r3838 r3840  
    715715void TrackManager::joinV(unsigned int count, int* trackIDs)
    716716{
     717  TrackElement* tmpTrackElem;
     718  for (int i = 0; i < count; i++)
     719    if (!this->firstTrackElem->findByID(trackIDs[i]))
     720      {
     721        PRINTF(1)("Error trying to Connect Paths that do not exist yet: %d\n Not Joining Anything", trackIDs[i]);
     722        return;
     723      }
     724                 
     725
    717726  PRINTF(3)("Joining %d tracks and merging to Track %d\n", count, trackIDs[0]);
    718727
    719728  // checking if there is a back-loop-connection and ERROR if it is.
    720   TrackElement* tmpTrackElem = this->firstTrackElem->findByID(trackIDs[0]);
     729  tmpTrackElem = this->firstTrackElem->findByID(trackIDs[0]);
    721730  if (!tmpTrackElem->backLoopCheck(tmpTrackElem))
    722731    {
Note: See TracChangeset for help on using the changeset viewer.