Changeset 3746 in orxonox.OLD for orxonox/branches/levelloader/src/track_manager.cc
- Timestamp:
- Apr 7, 2005, 3:54:49 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/track_manager.cc
r3605 r3746 18 18 #include "track_manager.h" 19 19 20 #include "base_object.h" 20 21 #include "p_node.h" 21 22 #include "substring.h" 22 23 23 24 #include "track_node.h" 25 #include "stdincl.h" 26 #include "list.h" 27 #include "debug.h" 28 29 24 30 25 31 #include <stdarg.h> … … 67 73 if ((!this->isJoined &&this->childCount > 0) || (this->isJoined && this->mainJoin)) 68 74 { 69 TrackElement* enumElem = children->enumerate(); 75 tIterator<TrackElement>* iterator = this->children->getIterator(); 76 TrackElement* enumElem = iterator->nextElement(); 70 77 while (enumElem) 71 78 { 72 79 delete enumElem; 73 enumElem = children->nextElement(); 74 } 80 enumElem = iterator->nextElement(); 81 } 82 delete iterator; 75 83 delete this->children; 76 84 } … … 92 100 if (this->childCount > 0) 93 101 { 94 TrackElement* enumElem = this->children->enumerate(); 102 tIterator<TrackElement>* iterator = this->children->getIterator(); 103 TrackElement* enumElem = iterator->nextElement(); 95 104 TrackElement* tmpElem; 96 105 while (enumElem) … … 98 107 if ((tmpElem = enumElem->findByID(trackID))) 99 108 return tmpElem; 100 enumElem = this->children->nextElement(); 101 } 109 enumElem = iterator->nextElement(); 110 } 111 delete iterator; 102 112 } 103 113 else … … 145 155 else 146 156 { 147 TrackElement* enumElem = this->children->enumerate(); 157 tIterator<TrackElement>* iterator = this->children->getIterator(); 158 TrackElement* enumElem = iterator->nextElement(); 148 159 while (enumElem) 149 160 { 150 161 if(!enumElem->backLoopCheck(trackElem)) 151 162 return false; 152 enumElem = this->children->nextElement(); 153 } 163 enumElem = iterator->nextElement(); 164 } 165 delete iterator; 154 166 155 167 return true; … … 287 299 PNode* tmpNode = (PNode*)node; 288 300 289 if (tmpNode->getRelCoor() .z < 0)301 if (tmpNode->getRelCoor()->z < 0) 290 302 return 0; 291 303 else … … 308 320 PNode* tmpNode = (PNode*)node; 309 321 310 Vector nodeRelCoord = tmpNode->getRelCoor();322 Vector nodeRelCoord = *tmpNode->getRelCoor(); 311 323 float minDist = 100000000; 312 324 int childNumber = 0; … … 910 922 void TrackManager::drawGraph(float dt) const 911 923 { 912 913 924 for (int i = 1; i <= trackElemCount; i++) 914 925 { … … 922 933 glVertex3f(tmpVector.x, tmpVector.y, tmpVector.z); 923 934 } 924 glEnd();935 glEnd(); 925 936 } 926 937 }
Note: See TracChangeset
for help on using the changeset viewer.