- Timestamp:
- May 23, 2012, 1:07:29 PM (13 years ago)
- Location:
- code/branches/presentation2012
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012
-
code/branches/presentation2012/src/orxonox/controllers/WaypointController.cc
r8891 r9229 62 62 void WaypointController::tick(float dt) 63 63 { 64 64 if (!this->isActive()) 65 65 return; 66 66 67 67 68 if (this->waypoints_.size() == 0 || !this->getControllableEntity()) 68 69 return; 69 70 71 70 72 if (this->waypoints_[this->currentWaypoint_]->getWorldPosition().squaredDistance(this->getControllableEntity()->getPosition()) <= this->squaredaccuracy_) 71 73 this->currentWaypoint_ = (this->currentWaypoint_ + 1) % this->waypoints_.size(); 74 72 75 73 76 this->moveToPosition(this->waypoints_[this->currentWaypoint_]->getWorldPosition());
Note: See TracChangeset
for help on using the changeset viewer.