Changeset 3953 in orxonox.OLD for orxonox/branches/physics/src/track_manager.cc
- Timestamp:
- Apr 25, 2005, 9:29:41 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/track_manager.cc
r3849 r3953 111 111 } 112 112 // if not found 113 else 114 return NULL; 113 return NULL; 115 114 } 116 115 … … 141 140 } 142 141 // if not found 143 else 144 return NULL; 142 return NULL; 145 143 } 146 144 … … 762 760 { 763 761 TrackElement* tmpTrackElem; 762 TrackElement* tmpJoinElem; 764 763 for (int i = 0; i < count; i++) 765 764 if (!this->firstTrackElem->findByID(trackIDs[i])) … … 793 792 for (int i = 0; i < count; i++) 794 793 { 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 } 799 800 } 800 801 // time the main Join. … … 804 805 for (int i = 1; i < count; i++) 805 806 { 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 } 824 827 } 825 828 }
Note: See TracChangeset
for help on using the changeset viewer.