- Timestamp:
- Nov 26, 2015, 9:08:11 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc
r10859 r10864 35 35 RegisterClass(WingmanController); 36 36 37 // CommonController contains all common functionality of AI Controllers38 WingmanController::WingmanController(Context* context) : CommonController(context)37 //ActionpointController contains all common functionality of AI Controllers 38 WingmanController::WingmanController(Context* context) : ActionpointController(context) 39 39 { 40 40 RegisterObject(WingmanController); … … 81 81 if (!this->myLeader_) 82 82 { 83 CommonController* newLeader = findNewLeader();83 ActionpointController* newLeader = findNewLeader(); 84 84 this->myLeader_ = newLeader; 85 85 … … 92 92 if (!this->myLeader_) 93 93 { 94 CommonController::action();94 ActionpointController::action(); 95 95 } 96 96 else if (this->myLeader_) … … 217 217 } 218 218 //----POST: closest leader that is ready to take a new wingman is returned---- 219 CommonController* WingmanController::findNewLeader()219 ActionpointController* WingmanController::findNewLeader() 220 220 { 221 221 … … 224 224 225 225 //----vars for finding the closest leader---- 226 CommonController* closestLeader = 0;226 ActionpointController* closestLeader = 0; 227 227 float minDistance = std::numeric_limits<float>::infinity(); 228 228 Gametype* gt = this->getGametype(); 229 for (ObjectList< CommonController>::iterator it = ObjectList<CommonController>::begin(); it; ++it)229 for (ObjectList<ActionpointController>::iterator it = ObjectList<ActionpointController>::begin(); it; ++it) 230 230 { 231 231 //----0ptr or not a leader or dead?----
Note: See TracChangeset
for help on using the changeset viewer.