Changeset 9142 for code/branches/newlevel2012/src/orxonox
- Timestamp:
- Apr 29, 2012, 5:22:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/newlevel2012/src/orxonox/controllers/WaypointController.cc
r8891 r9142 62 62 void WaypointController::tick(float dt) 63 63 { 64 64 if (!this->isActive()) 65 65 return; 66 67 orxout() << "(" << this->waypoints_.size() << ") entity: " << this->getControllableEntity() << endl; 68 66 69 67 70 if (this->waypoints_.size() == 0 || !this->getControllableEntity()) 68 71 return; 69 72 73 printf("3"); 74 70 75 if (this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_) 71 76 this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size(); 77 78 printf("4"); 72 79 73 80 this->moveToPosition(this->waypoints_[this->currentWaypoint_]->getWorldPosition());
Note: See TracChangeset
for help on using the changeset viewer.