Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 25, 2005, 9:29:41 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/physics: merged with trunk - with command svn merge -r 3866:HEAD

File:
1 edited

Legend:

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

    r3849 r3953  
    111111    }
    112112  // if not found
    113   else
    114     return NULL;
     113  return NULL;
    115114}
    116115
     
    141140    }
    142141  // if not found
    143   else
    144     return NULL;
     142  return NULL;
    145143}
    146144
     
    762760{
    763761  TrackElement* tmpTrackElem;
     762  TrackElement* tmpJoinElem;
    764763  for (int i = 0; i < count; i++)
    765764    if (!this->firstTrackElem->findByID(trackIDs[i]))
     
    793792  for (int i = 0; i < count; i++)
    794793    {
    795       TrackElement* tmpJoinElem = this->firstTrackElem->findByID(trackIDs[i]);
    796       if (tmpJoinElem->childCount == 0
    797           && tmpJoinElem->endTime > tmpLatestTime)
    798         tmpLatestTime = tmpJoinElem->endTime;
     794      if(tmpJoinElem = this->firstTrackElem->findByID(trackIDs[i]))
     795        {
     796          if (tmpJoinElem->childCount == 0
     797              && tmpJoinElem->endTime > tmpLatestTime)
     798            tmpLatestTime = tmpJoinElem->endTime;
     799        }
    799800    }
    800801  // time the main Join.
     
    804805  for (int i = 1; i < count; i++)
    805806    {
    806       TrackElement* tmpJoinElem = this->firstTrackElem->findByID(trackIDs[i]);
    807       if (tmpJoinElem->childCount > 0)
    808         printf("!!This Curve has children, and as such will not be joined!!\n You can try joining other childless TrackElements to this one!");
    809       else
    810         {
    811           this->addPoint(tmpc2Point, tmpJoinElem);
    812           this->addPoint(tmpTangentPoint, tmpJoinElem);
    813           this->addPoint(tmpEndPoint, tmpJoinElem);
    814           // time all other Joins
    815           tmpJoinElem->jumpTime = tmpLatestTime - tmpJoinElem->endTime;
    816          
    817           //Copying Joint-Info
    818           tmpJoinElem->children = firstJoint->children;
    819           tmpJoinElem->childCount = firstJoint->childCount;
    820           tmpJoinElem->isSavePoint = firstJoint->isSavePoint;
    821           tmpJoinElem->isFork = firstJoint->isFork;
    822 
    823           tmpJoinElem->isJoined = true;
     807      if( tmpJoinElem = this->firstTrackElem->findByID(trackIDs[i]))
     808        {
     809          if (tmpJoinElem->childCount > 0)
     810            printf("!!This Curve has children, and as such will not be joined!!\n You can try joining other childless TrackElements to this one!");
     811          else
     812            {
     813              this->addPoint(tmpc2Point, tmpJoinElem);
     814              this->addPoint(tmpTangentPoint, tmpJoinElem);
     815              this->addPoint(tmpEndPoint, tmpJoinElem);
     816              // time all other Joins
     817              tmpJoinElem->jumpTime = tmpLatestTime - tmpJoinElem->endTime;
     818             
     819              //Copying Joint-Info
     820              tmpJoinElem->children = firstJoint->children;
     821              tmpJoinElem->childCount = firstJoint->childCount;
     822              tmpJoinElem->isSavePoint = firstJoint->isSavePoint;
     823              tmpJoinElem->isFork = firstJoint->isFork;
     824             
     825              tmpJoinElem->isJoined = true;
     826            }
    824827        }
    825828    }
Note: See TracChangeset for help on using the changeset viewer.