Changeset 9620 for code/branches/formationupdate/src/orxonox/controllers
- Timestamp:
- Apr 30, 2013, 4:04:26 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
r9619 r9620 534 534 } 535 535 536 /* 536 537 537 void FormationController::setNewMasterWithinFormation(FormationController* newMaster) 538 538 { 539 if(this->state_ != MASTER ) return;539 if(this->state_ != MASTER || newMaster->myMaster_ != this) return; 540 540 541 541 if (!this->slaves_.empty()) 542 542 { 543 std::vector<FormationController*>::iterator it2 = std::find(this->slaves_.begin(), this->slaves_.end(), newMaster); 544 if (it2 != this->slaves_.end()) 545 { 546 this->slaves_.erase(it2); 547 } 548 543 549 newMaster->state_ = MASTER; 544 550 newMaster->slaves_ = this->slaves_; … … 555 561 this->state_ = FREE; 556 562 } 557 */ 563 558 564 559 565 -
code/branches/formationupdate/src/orxonox/controllers/FormationController.h
r9619 r9620 60 60 static void formationsize(const int size); 61 61 void setNewMasterWithinFormation(); 62 //void setNewMasterWithinFormation(FormationController* newMaster);62 void setNewMasterWithinFormation(FormationController* newMaster); 63 63 64 64 inline void setFormationFlight(bool formation)
Note: See TracChangeset
for help on using the changeset viewer.