Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2018, 4:03:15 PM (7 years ago)
Author:
andera
Message:

botpointer works

Location:
code/branches/RacingBots_FS18/src/modules/gametypes
Files:
2 edited

Legend:

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

    r11893 r11912  
    6363
    6464        int i;
    65         for (i = -2; findCheckpoint(i) != nullptr; i--)
     65        for (i = -2; findCheckpoint(i) != nullptr; i--)     // WIESO?
    6666        {
    6767            continue;
     
    124124                if (currentCheckpoint == findCheckpoint(checkpointIndex))
    125125                {
    126                     //orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
     126                    orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
    127127                    continue;
    128128                }
    129129                if (findCheckpoint(checkpointIndex) == nullptr){
    130                     orxout()<<"nullpointer @ SpaceraceController line 130"<< endl;
    131130                    orxout(internal_warning) << "Problematic Point: " << checkpointIndex << endl;
    132131                }
    133132                else
    134133                    numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(checkpointIndex), zaehler);
     134
    135135            }
    136136            zaehler[currentCheckpoint] += numberOfWays;
     
    173173
    174174        }
    175 
     175        if(minNextRaceCheckPoint==nullptr){orxout()<<"minNextRaceCheckPoint=nullpointer line 175 SpaceRaceController index: "<<endl;}
    176176        return minNextRaceCheckPoint;
    177177    }
     
    228228            if (checkpoint->getCheckpointIndex() == index)
    229229                return checkpoint;
    230         }
    231 
     230
     231        }
     232
     233        orxout()<<"returned nullptr @line 231 SpaceRaceController"<<endl;
    232234        return nullptr;
    233235    }
     
    325327            this->moveToPosition(Vector3(rnd()*100, rnd()*100, rnd()*100));
    326328            this->spin();
    327             //orxout(user_status) << "Mindistance reached" << std::endl;
     329            orxout(user_status) << "Mindistance reached" << std::endl;
    328330            return;
    329331        }
  • code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceManager.cc

    r11071 r11912  
    113113    RaceCheckPoint* SpaceRaceManager::findCheckpoint(int index) const
    114114    {
    115         for (RaceCheckPoint* checkpoint : this->checkpoints_)
     115        /*for (RaceCheckPoint* checkpoint : this->checkpoints_)
    116116        if (checkpoint->getCheckpointIndex() == index)
    117117        return checkpoint;
     118        return nullptr;*/
     119        for (RaceCheckPoint* checkpoint : this->checkpoints_){
     120            if (checkpoint->getCheckpointIndex() == index)
     121                return checkpoint;
     122        }
     123        orxout()<<"returned checkpoint @line 123 SpaceRaceManager"<<endl;
    118124        return nullptr;
    119125    }
Note: See TracChangeset for help on using the changeset viewer.