Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8773 for code/branches/ai2/src


Ignore:
Timestamp:
Jul 24, 2011, 10:40:19 PM (13 years ago)
Author:
jo
Message:

Just to show a bug in the level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai2/src/orxonox/controllers/ArtificialController.cc

    r8770 r8773  
    11701170                   waypoint = *it;
    11711171                   if(waypoint->getIdentifier() == ClassByString(name))
    1172                    {//TODO: check distance,
    1173                        // PickupSpawner: adjust waypoint accuracy to PickupSpawner's triggerdistance
    1174                        // ForceField: analyze is angle between forcefield boost and own flying direction is acceptable
     1172                   {
     1173                       ControllableEntity* controllable = this->getControllableEntity();
     1174                       if(!controllable) continue;
     1175                       float distance = ( waypoint->getPosition() - controllable->getPosition() ).length();
     1176                       if(distance > 50.0f || distance < 5.0f) continue;
     1177                       if(name == "PickupSpawner") // PickupSpawner: adjust waypoint accuracy to PickupSpawner's triggerdistance
     1178                       {
     1179                           squaredaccuracy_ = waypoint->getTriggerDistance() * waypoint->getTriggerDistance();
     1180                       }
     1181                       else if(name == "ForceField") // ForceField: analyze is angle between forcefield boost and own flying direction is acceptable
     1182                       {
     1183
     1184                       }
     1185
     1186
    11751187                       break;
    11761188                   }
Note: See TracChangeset for help on using the changeset viewer.