Changeset 1591 for code/branches/core3/src/orxonox/objects/NPC.cc
- Timestamp:
- Jun 12, 2008, 2:00:15 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core3/src/orxonox/objects/NPC.cc
r1574 r1591 31 31 32 32 #include "core/CoreIncludes.h" 33 #include "core/Iterator.h" 33 34 34 35 namespace orxonox { … … 117 118 int numberOfNeighbour = 0; //number of observed neighbours 118 119 float distance = 0; // distance to the actual element 119 for( Iterator<WorldEntity>it = ObjectList<WorldEntity>::begin(); it; ++it) { //go through all elements120 for(ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it; ++it) { //go through all elements 120 121 distance = getDistance(*it); //get distance between this and actual 121 122 if ((distance > 0) && (distance < SEPERATIONDISTANCE)) { //do only if actual is inside detectionradius … … 144 145 //float distance = 0; 145 146 //go through all elements 146 for( Iterator<NPC>it = ObjectList<NPC>::begin(); it; ++it) { //just working with 3 elements at the moment147 for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) { //just working with 3 elements at the moment 147 148 float distance = getDistance(*it); //get distance between this and actual 148 149 if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) { //check if actual element is inside detectionradius … … 164 165 //float distance = 0; 165 166 //go through all elements 166 for( Iterator<NPC>it = ObjectList<NPC>::begin(); it; ++it) { //just working with 3 elements at the moment167 for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) { //just working with 3 elements at the moment 167 168 float distance = getDistance(*it); //get distance between this and actual 168 169 if ((distance > 0) && (distance < COHESIONDISTANCE)) { //check if actual element is inside detectionradius
Note: See TracChangeset
for help on using the changeset viewer.