[Orxonox-commit 4099] r8770 - code/branches/ai2/src/orxonox/controllers

jo at orxonox.net jo at orxonox.net
Thu Jul 21 18:07:00 CEST 2011


Author: jo
Date: 2011-07-21 18:07:00 +0200 (Thu, 21 Jul 2011)
New Revision: 8770

Modified:
   code/branches/ai2/src/orxonox/controllers/ArtificialController.cc
Log:
That was no English :-). Now worldentities can be identified and added as waypoints by string.

Modified: code/branches/ai2/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/branches/ai2/src/orxonox/controllers/ArtificialController.cc	2011-07-21 15:36:37 UTC (rev 8769)
+++ code/branches/ai2/src/orxonox/controllers/ArtificialController.cc	2011-07-21 16:07:00 UTC (rev 8770)
@@ -1165,9 +1165,16 @@
             for (ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it != ObjectList<WorldEntity>::end(); ++it)
             {
                 //get POI by string: Possible POIs are PICKUPSPAWNER, FORCEFIELDS (!analyse!), ...
-                //if(it->isA(Pickupable)) //distance to POI decides wether it is added (neither too close nor too far away)
-                //To Think: how should POI's be managed? (e.g. if there are no real moving target or if the can be taken "en passant".)
+                //distance to POI decides wether it is added (neither too close nor too far away)
+                //How should POI's be managed? (e.g. Look for POIs if there are no real targets to move to or if they can be taken "en passant".)
                    waypoint = *it;
+                   if(waypoint->getIdentifier() == ClassByString(name))
+                   {//TODO: check distance,
+                       // PickupSpawner: adjust waypoint accuracy to PickupSpawner's triggerdistance
+                       // ForceField: analyze is angle between forcefield boost and own flying direction is acceptable
+                       break;
+                   }
+
                 /*const Vector3 realDistance = it->getPosition() - this->getControllableEntity()->getPosition();
                 if( realDistance.length() < distance)
                 {




More information about the Orxonox-commit mailing list