Changeset 9619 for code/branches/formationupdate/src/orxonox/controllers
- Timestamp:
- Apr 30, 2013, 3:55:12 PM (12 years ago)
- Location:
- code/branches/formationupdate/src/orxonox/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/formationupdate/src/orxonox/controllers/FormationController.cc
r9348 r9619 534 534 } 535 535 536 /* 537 void FormationController::setNewMasterWithinFormation(FormationController* newMaster) 538 { 539 if(this->state_ != MASTER) return; 540 541 if (!this->slaves_.empty()) 542 { 543 newMaster->state_ = MASTER; 544 newMaster->slaves_ = this->slaves_; 545 newMaster->myMaster_ = 0; 546 547 for(std::vector<FormationController*>::iterator it = newMaster->slaves_.begin(); it != newMaster->slaves_.end(); it++) 548 { 549 (*it)->myMaster_ = newMaster; 550 } 551 } 552 553 this->slaves_.clear(); 554 this->specificMasterAction_ = NONE; 555 this->state_ = FREE; 556 } 557 */ 558 536 559 537 560 /** -
code/branches/formationupdate/src/orxonox/controllers/FormationController.h
r9617 r9619 59 59 static void passivebehaviour(const bool passive); 60 60 static void formationsize(const int size); 61 void takeLeadOfFormation();62 void loseMasterState();61 void setNewMasterWithinFormation(); 62 //void setNewMasterWithinFormation(FormationController* newMaster); 63 63 64 64 inline void setFormationFlight(bool formation) … … 103 103 FormationController* getMaster( void ) { return myMaster_; } 104 104 FormationController* getThis( void ) { return this; } 105 FormationController* getSlave( void ) { return this->slaves_.back(); } 105 106 106 107 protected: … … 133 134 void searchNewMaster(); 134 135 void commandSlaves(); 135 void setNewMasterWithinFormation(); 136 void takeLeadOfFormation(); 137 void loseMasterState(); 136 138 137 139 void freeSlaves();
Note: See TracChangeset
for help on using the changeset viewer.