Changeset 9490 for code/branches/Racingbot
- Timestamp:
- Dec 3, 2012, 5:46:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Racingbot/src/modules/gametypes/SpaceRaceController.cc
r9487 r9490 312 312 lastPositionSpaceship=this->getControllableEntity()->getPosition(); 313 313 } 314 // korrigieren! done314 //TODO: korrigieren! 315 315 else if((lastPositionSpaceship-this->getControllableEntity()->getPosition()).length()/dt< MINDISTANCE ){ 316 316 this->moveToPosition(Vector3(rnd()*100,rnd()*100,rnd()*100)); … … 345 345 if (dynamic_cast<RaceCheckPoint*>(*it)!=NULL){continue;} // does not work jet 346 346 347 problematicObjects.insert(problematicObjects.end(), (*it));347 problematicObjects.insert(problematicObjects.end(), *it); 348 348 //it->getScale3D();// vector fuer halbe wuerfellaenge 349 349 } … … 361 361 bool collision=false; 362 362 363 for ( float j =0; j<STEPS; j++){364 Vector3 tempPosition=(point1 - (point2-point1+richtungen[i]*PHI)* j/STEPS);363 for (int j =0; j<STEPS; j++){ 364 Vector3 tempPosition=(point1 - (point2-point1+richtungen[i]*PHI)*(float)j/STEPS); 365 365 for (std::vector<StaticEntity*>::iterator it = problematicObjects.begin(); it!=problematicObjects.end(); ++it){ 366 366 btVector3 positionObject; 367 367 btScalar radiusObject; 368 //TODO: Probably it points on a wrong object 368 369 for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=0; everyShape++){ 369 370 (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()->getBoundingSphere(positionObject,radiusObject); … … 382 383 Vector3 possiblePosition=(point1 - (point2-point1+richtungen[i]*PHI)*j/STEPS); 383 384 collision=false; 384 for( float ij=0; ij<STEPS; j++){385 Vector3 tempPosition=(possiblePosition - (point2-possiblePosition)* ij/STEPS);385 for(int ij=0; ij<STEPS; j++){ 386 Vector3 tempPosition=(possiblePosition - (point2-possiblePosition)*(float)ij/STEPS); 386 387 for (std::vector<StaticEntity*>::iterator it = problematicObjects.begin(); it!=problematicObjects.end(); ++it){ 387 388 btVector3 positionObject;
Note: See TracChangeset
for help on using the changeset viewer.