Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 6, 2005, 5:09:13 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/parenting: :TrackManager: forking works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/parenting/src/track_manager.cc

    r3350 r3351  
    232232    }
    233233  this->currentTrackElem->curve->addNode(newPoint);
     234  this->currentTrackElem->nodeCount++;
    234235}
    235236
     
    249250  // \todo HotPoint Handling.
    250251  this->currentTrackElem->curve->addNode(newPoint);
     252  this->currentTrackElem->nodeCount++;
    251253}
    252254
     
    277279void TrackManager::fork(unsigned int count, ...)
    278280{
    279   int* trackIDs = new int [count];
     281  int* trackIDs = new int[count];
     282  this->forkV(count, trackIDs);
    280283  va_list ID;
    281284  va_start (ID, count);
    282285  for(int i = 0; i < count; i++)
    283286    {
    284       trackIDs[i] = va_arg (ID, int);
    285     }
    286   va_end(ID);
    287   this->forkV(count, trackIDs);
     287      *va_arg (ID, int*) = trackIDs[i];
     288    }
     289  va_end(ID); 
    288290  delete []trackIDs;
    289291}
     
    303305    return;
    304306  this->currentTrackElem->isFork = true;
    305 
     307  for(int i = 0; i < count; i++)
     308    trackIDs[i]=this->trackElemCount+1+i;
    306309  this->initChildren(count);
    307310}
     
    463466            printf("   is a SavePoint\n");
    464467          if(tmpElem->isFork)
    465             printf("   is A Fork with with %d children\n", tmpElem->childCount);
     468            {
     469              printf("   is A Fork with with %d children: ", tmpElem->childCount);
     470              for(int i = 0; i < tmpElem->childCount; i++)
     471                printf("=%d= ", tmpElem->children[i]->ID);
     472              printf("\n");
     473            }
    466474          if(tmpElem->isJoined)
    467475            printf("   is Joined at the End\n");
Note: See TracChangeset for help on using the changeset viewer.