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
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/RacingBots_FS18/data/levels/newnewnewspacerace.oxw

    r11893 r11912  
    479479
    480480<!-- the last checkpoint is bigger and red -->
    481     <RaceCheckPoint name="checkpoint20" yaw=90 pitch=90 position="53000,0,0" direction="0,1,0" roll="0" collisionType="static" scale="1" distance="60" checkpointindex="19" islast="true">
     481    <RaceCheckPoint name="checkpoint20" yaw=90 pitch=90 position="51000,0,0" direction="0,1,0" roll="0" collisionType="static" scale="1" distance="60" checkpointindex="19" islast="true">
    482482        <attached>
    483483      <Model position="0,0,0" scale="70" mesh="Checkpoint_Finish.mesh"/>
     
    499499      </attached>
    500500      <controller>
    501         <ArrowController accuracy = 2000>
     501        <ArrowController accuracy = 5000>
    502502          <gpspoints>
    503             <Model mesh="cube.mesh" scale=2 position="1000,30,0"/>
    504             <Model mesh="cube.mesh" scale=2 position="3000,200,100"/>
    505             <Model mesh="cube.mesh" scale=2 position="5000,100,500"/>
    506             <Model mesh="cube.mesh" scale=2 position="8000,-150,150"/>
    507             <Model mesh="cube.mesh" scale=2 position="10000,-200,200"/>
    508             <Model mesh="cube.mesh" scale=2 position="13000,200,400"/>
    509             <Model mesh="cube.mesh" scale=2 position="15000,0,0"/>
    510             <Model mesh="cube.mesh" scale=2 position="18000,150,-150"/>
    511             <Model mesh="cube.mesh" scale=2 position="21000,200,-120"/>
    512             <Model mesh="cube.mesh" scale=2 position="24000,-150,-80"/>
    513             <Model mesh="cube.mesh" scale=2 position="27000,-200,0"/>
    514             <Model mesh="cube.mesh" scale=2 position="30000,-300,900"/>
    515             <Model mesh="cube.mesh" scale=2 position="33000,600,60"/>
    516             <Model mesh="cube.mesh" scale=2 position="35000,120,20"/>
    517             <Model mesh="cube.mesh" scale=2 position="38000,-200,0"/>
    518             <Model mesh="cube.mesh" scale=2 position="41000,30,-50"/>
    519             <Model mesh="cube.mesh" scale=2 position="44000,90,0"/>
    520             <Model mesh="cube.mesh" scale=2 position="47000,120,30"/>
    521             <Model mesh="cube.mesh" scale=2 position="50000,0,100"/>
    522             <Model mesh="cube.mesh" scale=2 position="53000,0,0"/>
     503            <Model mesh="cube.mesh" scale=0 position="1000,30,0"/>
     504            <Model mesh="cube.mesh" scale=0 position="3000,200,100"/>
     505            <Model mesh="cube.mesh" scale=0 position="5000,100,500"/>
     506            <Model mesh="cube.mesh" scale=0 position="8000,-150,150"/>
     507            <Model mesh="cube.mesh" scale=0 position="10000,-200,200"/>
     508            <Model mesh="cube.mesh" scale=0 position="13000,200,400"/>
     509            <Model mesh="cube.mesh" scale=0 position="15000,0,0"/>
     510            <Model mesh="cube.mesh" scale=0 position="18000,150,-150"/>
     511            <Model mesh="cube.mesh" scale=0 position="21000,200,-120"/>
     512            <Model mesh="cube.mesh" scale=0 position="24000,-150,-80"/>
     513            <Model mesh="cube.mesh" scale=0 position="27000,-200,0"/>
     514            <Model mesh="cube.mesh" scale=0 position="30000,-300,900"/>
     515            <Model mesh="cube.mesh" scale=0 position="33000,600,60"/>
     516            <Model mesh="cube.mesh" scale=0 position="35000,120,20"/>
     517            <Model mesh="cube.mesh" scale=0 position="38000,-200,0"/>
     518            <Model mesh="cube.mesh" scale=0 position="41000,30,-50"/>
     519            <Model mesh="cube.mesh" scale=0 position="44000,90,0"/>
     520            <Model mesh="cube.mesh" scale=0 position="47000,120,30"/>
     521            <Model mesh="cube.mesh" scale=0 position="50000,0,100"/>
     522            <Model mesh="cube.mesh" scale=0 position="51000,0,0"/>
    523523
    524524           
  • 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.