- Timestamp:
- Jul 27, 2011, 9:21:29 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai2/src/orxonox/controllers/AIController.cc
r8791 r8792 241 241 WorldEntity* wPoint = this->waypoints_[this->waypoints_.size()-1]; 242 242 if(wPoint) 243 { 243 244 this->moveToPosition(wPoint->getWorldPosition()); //BUG ?? sometime wPoint->getWorldPosition() causes crash 244 if (wPoint->getWorldPosition().squaredDistance(controllable->getPosition()) <= this->squaredaccuracy_) 245 this->waypoints_.pop_back(); // if goal is reached, remove it from the list 245 if (wPoint->getWorldPosition().squaredDistance(controllable->getPosition()) <= this->squaredaccuracy_) 246 this->waypoints_.pop_back(); // if goal is reached, remove it from the list 247 } 248 else 249 this->waypoints_.pop_back(); // remove invalid waypoints 246 250 247 251 }
Note: See TracChangeset
for help on using the changeset viewer.