Changeset 9513 for code/branches/Racingbot/src/modules
- Timestamp:
- Dec 14, 2012, 4:47:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Racingbot/src/modules/gametypes/SpaceRaceController.cc
r9512 r9513 66 66 OrxAssert(!checkpoints.empty(), "No Checkpoints in Level"); 67 67 checkpoints_=checkpoints; 68 orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl;68 /*orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl; 69 69 for(std::vector<RaceCheckPoint*>::iterator it=checkpoints_.begin(); it!=checkpoints_.end(); it++) 70 70 { … … 84 84 orxout()<<endl<<endl; 85 85 86 }//ausgabe 86 }//ausgabe*/ 87 87 88 88 for( std::vector<RaceCheckPoint*>::iterator it = checkpoints.begin(); it!=checkpoints.end(); ++it) … … 99 99 } 100 100 } 101 } 101 }/* 102 102 for(std::vector<RaceCheckPoint*>::iterator it=checkpoints_.begin(); it!=checkpoints_.end(); it++) 103 103 { … … 118 118 119 119 }//ausgabe 120 orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl; 120 orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl;*/ 121 121 staticRacePoints_ = findStaticCheckpoints(checkpoints); 122 122 // initialisation of currentRaceCheckpoint_ … … 128 128 continue; 129 129 } 130 orxout()<<"Die ANzahl der virtuellen CP betraegt: "<< (-i)-2<<endl;130 //orxout()<<"Die ANzahl der virtuellen CP betraegt: "<< (-i)-2<<endl; 131 131 132 132 } … … 190 190 if(currentCheckpoint==findCheckpoint(*it)) 191 191 { 192 orxout() << currentCheckpoint->getCheckpointIndex()<<endl;192 //orxout() << currentCheckpoint->getCheckpointIndex()<<endl; 193 193 continue; 194 194 } … … 308 308 RaceCheckPoint* SpaceRaceController::addVirtualCheckPoint( RaceCheckPoint* previousCheckpoint, int indexFollowingCheckPoint , Vector3 virtualCheckPointPosition ) 309 309 { 310 orxout()<<"add VCP at"<<virtualCheckPointPosition.x<<", "<<virtualCheckPointPosition.y<<", "<<virtualCheckPointPosition.z<<endl; 310 311 RaceCheckPoint* newTempRaceCheckPoint; 311 312 for (ObjectList<SpaceRaceManager>::iterator it = ObjectList<SpaceRaceManager>::begin(); it!= ObjectList<SpaceRaceManager>::end(); ++it) … … 320 321 321 322 Vector3 temp = previousCheckpoint->getVirtualNextCheckpointsAsVector3(); 322 orxout()<<"temp bei 0: ="<< temp.x<< temp.y<< temp.z<<endl;323 //orxout()<<"temp bei 0: ="<< temp.x<< temp.y<< temp.z<<endl; 323 324 checkpoints_.insert(checkpoints_.end(), newTempRaceCheckPoint); 324 325 int positionInNextCheckPoint; … … 336 337 previousCheckpoint->setNextVirtualCheckpointsAsVector3(temp); //Existiert internes Problem bei negativen index fueer next Checkpoint 337 338 virtualCheckPointIndex--; 338 orxout()<<"temp bei 1: ="<< temp.x<< temp.y<< temp.z<<endl;339 orxout()<<"temp nach ausgabe: "<<previousCheckpoint->getVirtualNextCheckpointsAsVector3().x<<previousCheckpoint->getVirtualNextCheckpointsAsVector3().y<<previousCheckpoint->getVirtualNextCheckpointsAsVector3().z<<endl;339 //orxout()<<"temp bei 1: ="<< temp.x<< temp.y<< temp.z<<endl; 340 //orxout()<<"temp nach ausgabe: "<<previousCheckpoint->getVirtualNextCheckpointsAsVector3().x<<previousCheckpoint->getVirtualNextCheckpointsAsVector3().y<<previousCheckpoint->getVirtualNextCheckpointsAsVector3().z<<endl; 340 341 //OrxAssert(virtualCheckPointIndex < -1, "TO much virtual cp"); 341 342 /*orxout()<<"id: "<< previousCheckpoint->getCheckpointIndex() <<", following:"<<indexFollowingCheckPoint<<" : "<<temp.x<<", "<<temp.y<<", "<<temp.z<<"; "; … … 366 367 nextRaceCheckpoint_ = nextPointFind(nextRaceCheckpoint_); 367 368 lastPositionSpaceship=this->getControllableEntity()->getPosition(); 368 orxout()<< "CP "<< currentRaceCheckpoint_->getCheckpointIndex()<<" chanched to: "<< nextRaceCheckpoint_->getCheckpointIndex()<<endl;369 //orxout()<< "CP "<< currentRaceCheckpoint_->getCheckpointIndex()<<" chanched to: "<< nextRaceCheckpoint_->getCheckpointIndex()<<endl; 369 370 } 370 371 } … … 377 378 nextRaceCheckpoint_ = nextPointFind(nextRaceCheckpoint_); 378 379 lastPositionSpaceship=this->getControllableEntity()->getPosition(); 379 orxout()<< "CP "<< currentRaceCheckpoint_->getCheckpointIndex()<<" chanched to: "<< nextRaceCheckpoint_->getCheckpointIndex()<<endl;380 //orxout()<< "CP "<< currentRaceCheckpoint_->getCheckpointIndex()<<" chanched to: "<< nextRaceCheckpoint_->getCheckpointIndex()<<endl; 380 381 } 381 382 else if ((lastPositionSpaceship-this->getControllableEntity()->getPosition()).length()/dt > ADJUSTDISTANCE) … … 497 498 if(!directLinePossible(racepoint1, racepoint2, problematicObjects)) 498 499 { 499 orxout()<<"From "<<racepoint1->getCheckpointIndex()<<" to "<<racepoint2->getCheckpointIndex()<<"produces: "<< virtualCheckPointIndex<<endl;500 //orxout()<<"From "<<racepoint1->getCheckpointIndex()<<" to "<<racepoint2->getCheckpointIndex()<<"produces: "<< virtualCheckPointIndex<<endl; 500 501 computeVirtualCheckpoint(racepoint1, racepoint2, problematicObjects); 501 502 }
Note: See TracChangeset
for help on using the changeset viewer.