Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9490


Ignore:
Timestamp:
Dec 3, 2012, 5:46:36 PM (11 years ago)
Author:
purgham
Message:

Still doesn't work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Racingbot/src/modules/gametypes/SpaceRaceController.cc

    r9487 r9490  
    312312            lastPositionSpaceship=this->getControllableEntity()->getPosition();
    313313        }
    314         //korrigieren! done
     314        //TODO: korrigieren!
    315315        else if((lastPositionSpaceship-this->getControllableEntity()->getPosition()).length()/dt< MINDISTANCE  ){
    316316            this->moveToPosition(Vector3(rnd()*100,rnd()*100,rnd()*100));
     
    345345                            if (dynamic_cast<RaceCheckPoint*>(*it)!=NULL){continue;} // does not work jet
    346346
    347                             problematicObjects.insert(problematicObjects.end(), (*it));
     347                            problematicObjects.insert(problematicObjects.end(), *it);
    348348                            //it->getScale3D();// vector fuer halbe wuerfellaenge
    349349                        }
     
    361361            bool collision=false;
    362362
    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);
    365365                for (std::vector<StaticEntity*>::iterator it = problematicObjects.begin(); it!=problematicObjects.end(); ++it){
    366366                    btVector3 positionObject;
    367367                    btScalar radiusObject;
     368                    //TODO: Probably it points on a wrong object
    368369                    for (int everyShape=0; (*it)->getAttachedCollisionShape(everyShape)!=0; everyShape++){
    369370                        (*it)->getAttachedCollisionShape(everyShape)->getCollisionShape()->getBoundingSphere(positionObject,radiusObject);
     
    382383                Vector3 possiblePosition=(point1 - (point2-point1+richtungen[i]*PHI)*j/STEPS);
    383384                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);
    386387                            for (std::vector<StaticEntity*>::iterator it = problematicObjects.begin(); it!=problematicObjects.end(); ++it){
    387388                                btVector3 positionObject;
Note: See TracChangeset for help on using the changeset viewer.