Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 9, 2008, 4:25:52 AM (16 years ago)
Author:
landauf
Message:

merged core3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/NPC.cc

    r1625 r1747  
    3131
    3232#include "core/CoreIncludes.h"
     33#include "core/Iterator.h"
    3334
    3435namespace orxonox {
     
    5657    movable_ = movable;
    5758  }
    58  
     59
    5960  void NPC::registerAllVariables(){
    6061    Model::registerAllVariables();
    6162    registerVar(&movable_, sizeof(movable_), network::DATA);
    6263  }
    63  
     64
    6465
    6566  /**
     
    112113    int numberOfNeighbour = 0;  //number of observed neighbours
    113114    float distance = 0;  // distance to the actual element
    114     for(Iterator<WorldEntity> it = ObjectList<WorldEntity>::start(); it; ++it) {  //go through all elements
     115    for(ObjectList<WorldEntity>::iterator it = ObjectList<WorldEntity>::begin(); it; ++it) {  //go through all elements
    115116      distance = getDistance(*it);  //get distance between this and actual
    116117      if ((distance > 0) && (distance < SEPERATIONDISTANCE)) {  //do only if actual is inside detectionradius
     
    139140    //float distance = 0;
    140141    //go through all elements
    141     for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) {  //just working with 3 elements at the moment
     142    for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) {  //just working with 3 elements at the moment
    142143      float distance = getDistance(*it);  //get distance between this and actual
    143144      if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) {  //check if actual element is inside detectionradius
     
    159160    //float distance = 0;
    160161    //go through all elements
    161     for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) {  //just working with 3 elements at the moment
     162    for(ObjectList<NPC>::iterator it = ObjectList<NPC>::begin(); it; ++it) {  //just working with 3 elements at the moment
    162163      float distance = getDistance(*it);  //get distance between this and actual
    163164      if ((distance > 0) && (distance < COHESIONDISTANCE)) {  //check if actual element is inside detectionradius
Note: See TracChangeset for help on using the changeset viewer.