Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 30, 2013, 3:55:12 PM (11 years ago)
Author:
maxima
Message:

New function SetNewMasterWithinFormation(FormationController), but it does not work yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/formationupdate/src/orxonox/controllers/FormationController.cc

    r9348 r9619  
    534534    }
    535535
     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
    536559
    537560  /**
Note: See TracChangeset for help on using the changeset viewer.