Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 3, 2014, 9:44:23 PM (10 years ago)
Author:
landauf
Message:

removed unused code (some of the code was after a 'return' statement and thus never executed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/gametypes/SpaceRaceController.cc

    r9962 r9964  
    188188        {
    189189            int numberOfWays = 0; // counts number of ways from this Point to the last point
    190             for (std::set<int>::iterator it = currentCheckpoint->getVirtualNextCheckpoints().begin(); it!= currentCheckpoint->getVirtualNextCheckpoints().end(); ++it)
     190            for (std::set<int>::iterator it = currentCheckpoint->getNextCheckpoints().begin(); it!= currentCheckpoint->getNextCheckpoints().end(); ++it)
    191191            {
    192192                if(currentCheckpoint == findCheckpoint(*it))
     
    224224        float distances[] = {-1, -1, -1};
    225225        int temp_i = 0;
    226         for (std::set<int>::iterator it =raceCheckpoint->getVirtualNextCheckpoints().begin(); it!= raceCheckpoint->getVirtualNextCheckpoints().end(); ++it)
     226        for (std::set<int>::iterator it =raceCheckpoint->getNextCheckpoints().begin(); it!= raceCheckpoint->getNextCheckpoints().end(); ++it)
    227227        {
    228228            distances[temp_i] = recCalculateDistance(findCheckpoint(*it), this->getControllableEntity()->getPosition());
     
    233233            if (distances[2] < distances[1] && distances[2] >= 0)
    234234            {
    235                 return findCheckpoint(*raceCheckpoint->getVirtualNextCheckpoints().end()); // return checkpoint with ID of raceCheckpoint->getNextCheckpoints() [2]
     235                return findCheckpoint(*raceCheckpoint->getNextCheckpoints().end()); // return checkpoint with ID of raceCheckpoint->getNextCheckpoints() [2]
    236236            }
    237237            else
    238238            {
    239                 std::set<int>::iterator temp = raceCheckpoint->getVirtualNextCheckpoints().begin();
     239                std::set<int>::iterator temp = raceCheckpoint->getNextCheckpoints().begin();
    240240                return findCheckpoint(*(++temp)); // return [1]
    241241            }
     
    245245            if (distances[2] < distances[0] && distances[2] >= 0)
    246246            {
    247                 return findCheckpoint(*raceCheckpoint->getVirtualNextCheckpoints().end()); // return [2]
     247                return findCheckpoint(*raceCheckpoint->getNextCheckpoints().end()); // return [2]
    248248            }
    249249            else
    250250            {
    251                 return findCheckpoint(*raceCheckpoint->getVirtualNextCheckpoints().begin()); // return [0]
     251                return findCheckpoint(*raceCheckpoint->getNextCheckpoints().begin()); // return [0]
    252252            }
    253253        }
     
    268268        {
    269269            float minimum = std::numeric_limits<float>::max();
    270             for (std::set<int>::iterator it = currentCheckPoint->getVirtualNextCheckpoints().begin(); it != currentCheckPoint->getVirtualNextCheckpoints().end(); ++it)
     270            for (std::set<int>::iterator it = currentCheckPoint->getNextCheckpoints().begin(); it != currentCheckPoint->getNextCheckpoints().end(); ++it)
    271271            {
    272272                int dist_currentCheckPoint_currentPosition = static_cast<int> ((currentPosition- currentCheckPoint->getPosition()).length());
     
    289289            return nextRaceCheckpoint_;
    290290        }
    291         if ((currentRaceCheckpoint_->getVirtualNextCheckpoints()).size() == 1) // no Adjust possible
     291        if ((currentRaceCheckpoint_->getNextCheckpoints()).size() == 1) // no Adjust possible
    292292
    293293        {
Note: See TracChangeset for help on using the changeset viewer.