Changeset 9964 for code/trunk/src/modules/gametypes/SpaceRaceController.cc
- Timestamp:
- Jan 3, 2014, 9:44:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/gametypes/SpaceRaceController.cc
r9962 r9964 188 188 { 189 189 int numberOfWays = 0; // counts number of ways from this Point to the last point 190 for (std::set<int>::iterator it = currentCheckpoint->get VirtualNextCheckpoints().begin(); it!= currentCheckpoint->getVirtualNextCheckpoints().end(); ++it)190 for (std::set<int>::iterator it = currentCheckpoint->getNextCheckpoints().begin(); it!= currentCheckpoint->getNextCheckpoints().end(); ++it) 191 191 { 192 192 if(currentCheckpoint == findCheckpoint(*it)) … … 224 224 float distances[] = {-1, -1, -1}; 225 225 int temp_i = 0; 226 for (std::set<int>::iterator it =raceCheckpoint->get VirtualNextCheckpoints().begin(); it!= raceCheckpoint->getVirtualNextCheckpoints().end(); ++it)226 for (std::set<int>::iterator it =raceCheckpoint->getNextCheckpoints().begin(); it!= raceCheckpoint->getNextCheckpoints().end(); ++it) 227 227 { 228 228 distances[temp_i] = recCalculateDistance(findCheckpoint(*it), this->getControllableEntity()->getPosition()); … … 233 233 if (distances[2] < distances[1] && distances[2] >= 0) 234 234 { 235 return findCheckpoint(*raceCheckpoint->get VirtualNextCheckpoints().end()); // return checkpoint with ID of raceCheckpoint->getNextCheckpoints() [2]235 return findCheckpoint(*raceCheckpoint->getNextCheckpoints().end()); // return checkpoint with ID of raceCheckpoint->getNextCheckpoints() [2] 236 236 } 237 237 else 238 238 { 239 std::set<int>::iterator temp = raceCheckpoint->get VirtualNextCheckpoints().begin();239 std::set<int>::iterator temp = raceCheckpoint->getNextCheckpoints().begin(); 240 240 return findCheckpoint(*(++temp)); // return [1] 241 241 } … … 245 245 if (distances[2] < distances[0] && distances[2] >= 0) 246 246 { 247 return findCheckpoint(*raceCheckpoint->get VirtualNextCheckpoints().end()); // return [2]247 return findCheckpoint(*raceCheckpoint->getNextCheckpoints().end()); // return [2] 248 248 } 249 249 else 250 250 { 251 return findCheckpoint(*raceCheckpoint->get VirtualNextCheckpoints().begin()); // return [0]251 return findCheckpoint(*raceCheckpoint->getNextCheckpoints().begin()); // return [0] 252 252 } 253 253 } … … 268 268 { 269 269 float minimum = std::numeric_limits<float>::max(); 270 for (std::set<int>::iterator it = currentCheckPoint->get VirtualNextCheckpoints().begin(); it != currentCheckPoint->getVirtualNextCheckpoints().end(); ++it)270 for (std::set<int>::iterator it = currentCheckPoint->getNextCheckpoints().begin(); it != currentCheckPoint->getNextCheckpoints().end(); ++it) 271 271 { 272 272 int dist_currentCheckPoint_currentPosition = static_cast<int> ((currentPosition- currentCheckPoint->getPosition()).length()); … … 289 289 return nextRaceCheckpoint_; 290 290 } 291 if ((currentRaceCheckpoint_->get VirtualNextCheckpoints()).size() == 1) // no Adjust possible291 if ((currentRaceCheckpoint_->getNextCheckpoints()).size() == 1) // no Adjust possible 292 292 293 293 {
Note: See TracChangeset
for help on using the changeset viewer.