- Timestamp:
- Nov 25, 2015, 2:53:58 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc
r10856 r10858 98 98 switch (this->myLeader_->getAction()) 99 99 { 100 // case Action::FLY: 101 // { 102 // // Vector3 targetRelativePosition = getFormationPosition(); 103 // // Quaternion orient = 104 // // this->myDivisionLeader_->getControllableEntity()->getWorldOrientation(); 105 // // Vector3 targetAbsolutePosition = 106 // // ((this->myDivisionLeader_->getControllableEntity()->getWorldPosition()) + 107 // // (orient* (targetRelativePosition))); 108 // // this->setAction (Action::FLY, targetAbsolutePosition, orient); 109 // break; 110 // } 111 // case Action::FIGHT: 112 // { 113 114 // // this->setAction (Action::FLY, targetAbsolutePosition, orient); 115 // break; 116 // } 100 case Action::FIGHT: 101 { 102 if (!this->hasTarget()) 103 { 104 this->setTarget(this->myLeader_->getTarget()); 105 } 106 break; 107 } 108 case Action::FIGHTALL: 109 { 110 if (!this->hasTarget()) 111 { 112 this->setTarget(this->myLeader_->getTarget()); 113 } 114 break; 115 } 116 case Action::ATTACK: 117 { 118 if (!this->hasTarget()) 119 { 120 this->setTarget(this->myLeader_->getTarget()); 121 } 122 break; 123 } 117 124 default: 118 125 { … … 146 153 } 147 154 } 155 } 156 if (this->hasTarget()) 157 { 158 //----choose where to go---- 159 this->maneuver(); 160 //----fire if you can---- 161 this->bShooting_ = this->canFire(); 148 162 } 149 163 }
Note: See TracChangeset
for help on using the changeset viewer.