Changeset 1747 for code/trunk/src/orxonox/objects/NPC.cc
- Timestamp:
- Sep 9, 2008, 4:25:52 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core3 (added) merged: 1573-1574,1583-1586,1591-1594,1596-1597,1603,1606-1607,1610-1611,1655,1658,1676-1679,1681-1685,1687,1716-1723,1725-1729,1736
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/NPC.cc
r1625 r1747 31 31 32 32 #include "core/CoreIncludes.h" 33 #include "core/Iterator.h" 33 34 34 35 namespace orxonox { … … 56 57 movable_ = movable; 57 58 } 58 59 59 60 void NPC::registerAllVariables(){ 60 61 Model::registerAllVariables(); 61 62 registerVar(&movable_, sizeof(movable_), network::DATA); 62 63 } 63 64 64 65 65 66 /** … … 112 113 int numberOfNeighbour = 0; //number of observed neighbours 113 114 float distance = 0; // distance to the actual element 114 for( Iterator<WorldEntity> it = ObjectList<WorldEntity>::start(); it; ++it) { //go through all elements115 for(ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it; ++it) { //go through all elements 115 116 distance = getDistance(*it); //get distance between this and actual 116 117 if ((distance > 0) && (distance < SEPERATIONDISTANCE)) { //do only if actual is inside detectionradius … … 139 140 //float distance = 0; 140 141 //go through all elements 141 for( Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) { //just working with 3 elements at the moment142 for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) { //just working with 3 elements at the moment 142 143 float distance = getDistance(*it); //get distance between this and actual 143 144 if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) { //check if actual element is inside detectionradius … … 159 160 //float distance = 0; 160 161 //go through all elements 161 for( Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) { //just working with 3 elements at the moment162 for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) { //just working with 3 elements at the moment 162 163 float distance = getDistance(*it); //get distance between this and actual 163 164 if ((distance > 0) && (distance < COHESIONDISTANCE)) { //check if actual element is inside detectionradius
Note: See TracChangeset
for help on using the changeset viewer.