- Timestamp:
- Oct 23, 2017, 2:56:00 PM (7 years ago)
- Location:
- code/branches/HUD_HS16
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/HUD_HS16
- Property svn:mergeinfo changed
-
code/branches/HUD_HS16/src/modules/gametypes/SpaceRaceController.cc
r11497 r11499 16 16 * GNU General Public License for more details. 17 17 * 18 * You should have 18 * You should have received a copy of the GNU General Public License 19 19 * along with this program; if not, write to the Free Software 20 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. … … 58 58 OrxAssert(!checkpoints.empty(), "No Checkpoints in Level"); 59 59 checkpoints_ = checkpoints; 60 /*orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl; 61 for(std::vector<RaceCheckPoint*>::iterator it=checkpoints_.begin(); it!=checkpoints_.end(); it++) 62 { 63 orxout()<<"Checkpoint "<<(*it)->getCheckpointIndex()<<"; NExtReal: "; 64 std::set<int> temp =(*it)->getNextCheckpoints(); 65 for (std::set<int>::iterator ii =temp.begin(); ii!=temp.end(); ii++) 66 { 67 orxout()<<(*ii)<<", "; 68 } 69 70 orxout()<<" NextVirtual: "; 71 temp=(*it)->getVirtualNextCheckpoints(); 72 for (std::set<int>::iterator ii =temp.begin(); ii!=temp.end(); ii++) 73 { 74 orxout()<<(*ii)<<", "; 75 } 76 orxout()<<endl<<endl; 77 78 }//ausgabe*/ 79 /* 80 for (std::vector<RaceCheckPoint*>::iterator it = checkpoints.begin(); it != checkpoints.end(); ++it) 81 { 82 std::set<int> nextCheckPoints = ((*it)->getNextCheckpoints()); 83 if(!nextCheckPoints.empty()) 84 { 85 for (std::set<int>::iterator numb = nextCheckPoints.begin(); numb!=nextCheckPoints.end(); numb++) 86 { 87 RaceCheckPoint* point2 = findCheckpoint((*numb)); 88 89 //if(point2 != nullptr) 90 //placeVirtualCheckpoints((*it), point2); 91 } 92 } 93 } 94 */ 95 /* 96 for(std::vector<RaceCheckPoint*>::iterator it=checkpoints_.begin(); it!=checkpoints_.end(); it++) 97 { 98 orxout()<<"Checkpoint "<<(*it)->getCheckpointIndex()<<"; NExtReal: "; 99 std::set<int> temp =(*it)->getNextCheckpoints(); 100 for (std::set<int>::iterator ii =temp.begin(); ii!=temp.end(); ii++) 101 { 102 orxout()<<(*ii)<<", "; 103 } 104 105 orxout()<<" NextVirtual: "; 106 temp=(*it)->getVirtualNextCheckpoints(); 107 for (std::set<int>::iterator ii =temp.begin(); ii!=temp.end(); ii++) 108 { 109 orxout()<<(*ii)<<", "; 110 } 111 orxout()<<endl; 112 113 }//ausgabe 114 orxout()<<"es gibt: "<<checkpoints_.size()<<"checkpoints"<<endl;*/ 60 115 staticRacePoints_ = findStaticCheckpoints(nextRaceCheckpoint_, checkpoints); 61 116 // initialisation of currentRaceCheckpoint_ … … 67 122 continue; 68 123 } 124 //orxout()<<"Die ANzahl der virtuellen CP betraegt: "<< (-i)-2<<endl; 69 125 70 126 } … … 169 225 minNextRaceCheckPoint = nextRaceCheckPoint; 170 226 } 171 172 227 } 173 228 … … 308 363 //orxout()<< "CP "<< currentRaceCheckpoint_->getCheckpointIndex()<<" chanched to: "<< nextRaceCheckpoint_->getCheckpointIndex()<<endl; 309 364 } 310 311 365 else if ((lastPositionSpaceship-this->getControllableEntity()->getPosition()).length()/dt > ADJUSTDISTANCE) 312 366 { … … 326 380 //orxout(user_status) << "dt= " << dt << "; distance= " << (lastPositionSpaceship-this->getControllableEntity()->getPosition()).length() <<std::endl; 327 381 lastPositionSpaceship = this->getControllableEntity()->getPosition(); 328 329 this->boostControl();330 382 this->moveToPosition(nextRaceCheckpoint_->getPosition()); 331 this->boostControl();332 383 } 333 384
Note: See TracChangeset
for help on using the changeset viewer.