[Orxonox-commit 7295] r11912 - in code/branches/RacingBots_FS18: data/levels src/modules/gametypes
andera at orxonox.net
andera at orxonox.net
Thu Apr 26 16:03:15 CEST 2018
Author: andera
Date: 2018-04-26 16:03:15 +0200 (Thu, 26 Apr 2018)
New Revision: 11912
Modified:
code/branches/RacingBots_FS18/data/levels/newnewnewspacerace.oxw
code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceController.cc
code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceManager.cc
Log:
botpointer works
Modified: code/branches/RacingBots_FS18/data/levels/newnewnewspacerace.oxw
===================================================================
--- code/branches/RacingBots_FS18/data/levels/newnewnewspacerace.oxw 2018-04-26 13:59:49 UTC (rev 11911)
+++ code/branches/RacingBots_FS18/data/levels/newnewnewspacerace.oxw 2018-04-26 14:03:15 UTC (rev 11912)
@@ -478,7 +478,7 @@
</RaceCheckPoint>
<!-- the last checkpoint is bigger and red -->
- <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">
+ <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">
<attached>
<Model position="0,0,0" scale="70" mesh="Checkpoint_Finish.mesh"/>
</attached>
@@ -498,28 +498,28 @@
<Model scale="5" mesh="botpointer4.mesh"/>
</attached>
<controller>
- <ArrowController accuracy = 2000>
+ <ArrowController accuracy = 5000>
<gpspoints>
- <Model mesh="cube.mesh" scale=2 position="1000,30,0"/>
- <Model mesh="cube.mesh" scale=2 position="3000,200,100"/>
- <Model mesh="cube.mesh" scale=2 position="5000,100,500"/>
- <Model mesh="cube.mesh" scale=2 position="8000,-150,150"/>
- <Model mesh="cube.mesh" scale=2 position="10000,-200,200"/>
- <Model mesh="cube.mesh" scale=2 position="13000,200,400"/>
- <Model mesh="cube.mesh" scale=2 position="15000,0,0"/>
- <Model mesh="cube.mesh" scale=2 position="18000,150,-150"/>
- <Model mesh="cube.mesh" scale=2 position="21000,200,-120"/>
- <Model mesh="cube.mesh" scale=2 position="24000,-150,-80"/>
- <Model mesh="cube.mesh" scale=2 position="27000,-200,0"/>
- <Model mesh="cube.mesh" scale=2 position="30000,-300,900"/>
- <Model mesh="cube.mesh" scale=2 position="33000,600,60"/>
- <Model mesh="cube.mesh" scale=2 position="35000,120,20"/>
- <Model mesh="cube.mesh" scale=2 position="38000,-200,0"/>
- <Model mesh="cube.mesh" scale=2 position="41000,30,-50"/>
- <Model mesh="cube.mesh" scale=2 position="44000,90,0"/>
- <Model mesh="cube.mesh" scale=2 position="47000,120,30"/>
- <Model mesh="cube.mesh" scale=2 position="50000,0,100"/>
- <Model mesh="cube.mesh" scale=2 position="53000,0,0"/>
+ <Model mesh="cube.mesh" scale=0 position="1000,30,0"/>
+ <Model mesh="cube.mesh" scale=0 position="3000,200,100"/>
+ <Model mesh="cube.mesh" scale=0 position="5000,100,500"/>
+ <Model mesh="cube.mesh" scale=0 position="8000,-150,150"/>
+ <Model mesh="cube.mesh" scale=0 position="10000,-200,200"/>
+ <Model mesh="cube.mesh" scale=0 position="13000,200,400"/>
+ <Model mesh="cube.mesh" scale=0 position="15000,0,0"/>
+ <Model mesh="cube.mesh" scale=0 position="18000,150,-150"/>
+ <Model mesh="cube.mesh" scale=0 position="21000,200,-120"/>
+ <Model mesh="cube.mesh" scale=0 position="24000,-150,-80"/>
+ <Model mesh="cube.mesh" scale=0 position="27000,-200,0"/>
+ <Model mesh="cube.mesh" scale=0 position="30000,-300,900"/>
+ <Model mesh="cube.mesh" scale=0 position="33000,600,60"/>
+ <Model mesh="cube.mesh" scale=0 position="35000,120,20"/>
+ <Model mesh="cube.mesh" scale=0 position="38000,-200,0"/>
+ <Model mesh="cube.mesh" scale=0 position="41000,30,-50"/>
+ <Model mesh="cube.mesh" scale=0 position="44000,90,0"/>
+ <Model mesh="cube.mesh" scale=0 position="47000,120,30"/>
+ <Model mesh="cube.mesh" scale=0 position="50000,0,100"/>
+ <Model mesh="cube.mesh" scale=0 position="51000,0,0"/>
Modified: code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceController.cc 2018-04-26 13:59:49 UTC (rev 11911)
+++ code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceController.cc 2018-04-26 14:03:15 UTC (rev 11912)
@@ -62,7 +62,7 @@
currentRaceCheckpoint_ = nullptr;
int i;
- for (i = -2; findCheckpoint(i) != nullptr; i--)
+ for (i = -2; findCheckpoint(i) != nullptr; i--) // WIESO?
{
continue;
}
@@ -123,15 +123,15 @@
{
if (currentCheckpoint == findCheckpoint(checkpointIndex))
{
- //orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
+ orxout() << currentCheckpoint->getCheckpointIndex()<<endl;
continue;
}
if (findCheckpoint(checkpointIndex) == nullptr){
- orxout()<<"nullpointer @ SpaceraceController line 130"<< endl;
orxout(internal_warning) << "Problematic Point: " << checkpointIndex << endl;
}
else
numberOfWays += rekSimulationCheckpointsReached(findCheckpoint(checkpointIndex), zaehler);
+
}
zaehler[currentCheckpoint] += numberOfWays;
return numberOfWays; // returns the number of ways from this point to the last one
@@ -172,7 +172,7 @@
}
}
-
+ if(minNextRaceCheckPoint==nullptr){orxout()<<"minNextRaceCheckPoint=nullpointer line 175 SpaceRaceController index: "<<endl;}
return minNextRaceCheckPoint;
}
@@ -227,8 +227,10 @@
for (RaceCheckPoint* checkpoint : this->checkpoints_){
if (checkpoint->getCheckpointIndex() == index)
return checkpoint;
+
}
+ orxout()<<"returned nullptr @line 231 SpaceRaceController"<<endl;
return nullptr;
}
@@ -324,7 +326,7 @@
{
this->moveToPosition(Vector3(rnd()*100, rnd()*100, rnd()*100));
this->spin();
- //orxout(user_status) << "Mindistance reached" << std::endl;
+ orxout(user_status) << "Mindistance reached" << std::endl;
return;
}
//orxout(user_status) << "dt= " << dt << "; distance= " << (lastPositionSpaceship-this->getControllableEntity()->getPosition()).length() <<std::endl;
Modified: code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceManager.cc
===================================================================
--- code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceManager.cc 2018-04-26 13:59:49 UTC (rev 11911)
+++ code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRaceManager.cc 2018-04-26 14:03:15 UTC (rev 11912)
@@ -112,9 +112,15 @@
*/
RaceCheckPoint* SpaceRaceManager::findCheckpoint(int index) const
{
- for (RaceCheckPoint* checkpoint : this->checkpoints_)
+ /*for (RaceCheckPoint* checkpoint : this->checkpoints_)
if (checkpoint->getCheckpointIndex() == index)
return checkpoint;
+ return nullptr;*/
+ for (RaceCheckPoint* checkpoint : this->checkpoints_){
+ if (checkpoint->getCheckpointIndex() == index)
+ return checkpoint;
+ }
+ orxout()<<"returned checkpoint @line 123 SpaceRaceManager"<<endl;
return nullptr;
}
More information about the Orxonox-commit
mailing list