- Timestamp:
- Nov 15, 2015, 4:47:35 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/FleetController.cc
r10793 r10805 87 87 for(std::vector<WeakPtr<DivisionController> >::iterator it = divisions_.begin(); it != divisions_.end(); ++it) 88 88 { 89 if (static_cast<ControllableEntity*>(*itP) != (*it)->getControllableEntity() && !(*it)->hasTarget()) 89 if (static_cast<ControllableEntity*>(*itP) != (*it)->getControllableEntity() && !(*it)->hasTarget() 90 && ((*itP)->getWorldPosition() - (*it)->getControllableEntity()->getWorldPosition()).length() < 10000) 90 91 { 91 (*it)->set Target(*itP);92 (*it)->setAction(Action::FIGHT, *itP); 92 93 } 93 94 … … 95 96 96 97 } 97 98 /*for(std::vector<WeakPtr<DivisionController> >::iterator it = divisions_.begin(); it != divisions_.end(); ++it) 99 { 100 Vector3* target = new Vector3 (0, 0, 2000); 101 (*it)->setAction (Action::FLY, *target); 102 } 103 */ 98 104 } 99 105 void FleetController::tick(float dt)
Note: See TracChangeset
for help on using the changeset viewer.