Changeset 3516 in orxonox.OLD for orxonox/branches/trackManager/src/track_manager.cc
- Timestamp:
- Mar 12, 2005, 4:00:06 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/trackManager/src/track_manager.cc
r3515 r3516 148 148 149 149 Vector nodeRelCoord = tmpNode->relCoordinate; 150 151 if (nodeRelCoord.z < 0) 152 return 0; 153 else 154 return 1; 150 float minDist = 100000000; 151 int nodeNumber = 0; 152 for (int i = 0; i < this->childCount; i++) 153 { 154 float dist = (nodeRelCoord - this->children[i]->curve->getNode(4)).len(); 155 if (dist < minDist) 156 { 157 minDist = dist; 158 nodeNumber = i; 159 } 160 } 161 PRINTF(3)("PathDecision with nearest algorithm: %d\n", nodeNumber); 162 return nodeNumber; 155 163 } 156 164 … … 432 440 break; 433 441 case ENEMYKILLED: 434 break;435 default: // same as LOWEST436 tmpElem->condFunc = &TrackElement::lowest;437 442 break; 438 443 }
Note: See TracChangeset
for help on using the changeset viewer.