Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2015, 4:42:14 PM (9 years ago)
Author:
gania
Message:

CommonController now has static methods only. Replace with a namespace?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc

    r10869 r10877  
    4949    DivisionController::~DivisionController()
    5050    {
    51         // if (!(this->parsedActionpoints_.empty() && this->loopActionpoints_.empty()))
    52         // {
    53         //     if (this->myFollower_)
    54         //     {
    55         //         this->myFollower_->takeActionpoints(this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
    56         //         if (this->myWingman_)
    57         //         {
    58         //             this->myWingman_->setAction(Action::FIGHTALL);
    59         //         }
    60         //     }
    61         //     else if (this->myWingman_)
    62         //     {
    63         //         this->myWingman_->takeActionpoints(this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_);
    64         //     }   
    65         // }
    6651        for (size_t i = 0; i < this->actionpoints_.size(); ++i)
    6752        {
     
    11297    }
    11398   
    114     bool DivisionController::setWingman(CommonController* cwingman)
     99    bool DivisionController::setWingman(ActionpointController* wingman)
    115100    {
    116101
    117         WeakPtr<WingmanController> wingman = orxonox_cast<WingmanController*>(cwingman);
     102        WingmanController* newWingman = orxonox_cast<WingmanController*>(wingman);
    118103        if (!this->myWingman_)
    119104        {
    120             this->myWingman_ = wingman;
     105            this->myWingman_ = newWingman;
    121106            return true;
    122107        }
     
    126111        }
    127112    }
    128     bool DivisionController::setFollower(LeaderController* myFollower)
     113    bool DivisionController::setFollower(ActionpointController* myFollower)
    129114    {
    130          if (!this->myFollower_)
     115        LeaderController* newFollower = orxonox_cast<LeaderController*> (myFollower);
     116        if (!this->myFollower_)
    131117        {
    132             this->myFollower_ = myFollower;
     118            this->myFollower_ = newFollower;
    133119            return true;
    134120        }
Note: See TracChangeset for help on using the changeset viewer.