- Timestamp:
- Nov 27, 2015, 4:42:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc
r10869 r10877 49 49 DivisionController::~DivisionController() 50 50 { 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 // }66 51 for (size_t i = 0; i < this->actionpoints_.size(); ++i) 67 52 { … … 112 97 } 113 98 114 bool DivisionController::setWingman( CommonController* cwingman)99 bool DivisionController::setWingman(ActionpointController* wingman) 115 100 { 116 101 117 W eakPtr<WingmanController> wingman = orxonox_cast<WingmanController*>(cwingman);102 WingmanController* newWingman = orxonox_cast<WingmanController*>(wingman); 118 103 if (!this->myWingman_) 119 104 { 120 this->myWingman_ = wingman;105 this->myWingman_ = newWingman; 121 106 return true; 122 107 } … … 126 111 } 127 112 } 128 bool DivisionController::setFollower( LeaderController* myFollower)113 bool DivisionController::setFollower(ActionpointController* myFollower) 129 114 { 130 if (!this->myFollower_) 115 LeaderController* newFollower = orxonox_cast<LeaderController*> (myFollower); 116 if (!this->myFollower_) 131 117 { 132 this->myFollower_ = myFollower;118 this->myFollower_ = newFollower; 133 119 return true; 134 120 }
Note: See TracChangeset
for help on using the changeset viewer.