- Timestamp:
- Nov 25, 2015, 2:05:43 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc
r10855 r10856 52 52 if (this->myFollower_) 53 53 { 54 this->myFollower_->takeActionpoints(this->parsedActionpoints_); 54 this->myFollower_->takeActionpoints(this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_); 55 } 56 else if (this->myWingman_) 57 { 58 this->myWingman_->takeActionpoints(this->parsedActionpoints_, this->loopActionpoints_, this->bLoop_); 55 59 } 56 60 for (size_t i = 0; i < this->actionpoints_.size(); ++i) … … 82 86 { 83 87 CommonController::stayNearProtect(); 84 }85 void DivisionController::setTargetPositionOfWingman()86 {87 if (!this->myWingman_)88 return;89 Vector3* targetRelativePositionOfWingman;90 switch (this->formationMode_){91 case FormationMode::WALL:92 {93 targetRelativePositionOfWingman = new Vector3 (400, 0, 0);94 break;95 }96 case FormationMode::FINGER4:97 {98 targetRelativePositionOfWingman = new Vector3 (400, 0, 200);99 break;100 }101 102 case FormationMode::DIAMOND:103 {104 targetRelativePositionOfWingman = new Vector3 (400, 0, 200);105 break;106 }107 }108 Quaternion orient = this->getControllableEntity()->getWorldOrientation();109 110 Vector3 targetAbsolutePositionOfWingman = ((this->getControllableEntity()->getWorldPosition()) +111 (this->getControllableEntity()->getWorldOrientation()* (*targetRelativePositionOfWingman)));112 113 myWingman_->setAction( Action::FLY, targetAbsolutePositionOfWingman, orient);114 115 88 } 116 89
Note: See TracChangeset
for help on using the changeset viewer.