- Timestamp:
- Nov 2, 2015, 4:48:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/SectionController.cc
r10731 r10759 37 37 { 38 38 RegisterObject(SectionController); 39 this->setFormationMode( WALL);39 this->setFormationMode(FormationMode::FINGER4); 40 40 41 41 this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&SectionController::action, this))); 42 42 this->myWingman_ = 0; 43 43 this->myDivisionLeader_ = 0; 44 this->rank_ = SECTIONLEADER;44 this->rank_ = Rank::SECTIONLEADER; 45 45 46 46 orxout(internal_error) << this << "Was created" << endl; … … 58 58 return; 59 59 60 /*if (this->target_) 61 { 62 this->aimAtTarget(); 63 this->doFire(); 64 this->bShooting_ = true; 65 }*/ 60 66 if (this->bHasTargetPosition_) 61 67 { … … 76 82 if (newDivisionLeader) 77 83 orxout(internal_error) << "new DivisionLeader set" << endl; 84 else 85 { 86 87 } 78 88 79 89 } 80 90 setTargetPositionOfWingman(); 91 if (this->target_ && this->myWingman_) 92 this->myWingman_->setTarget(this->target_); 93 81 94 82 95 } … … 88 101 Vector3* targetRelativePositionOfWingman; 89 102 switch (this->formationMode_){ 90 case WALL:103 case FormationMode::WALL: 91 104 { 92 105 targetRelativePositionOfWingman = new Vector3 (-400, 0, 0); 93 106 break; 94 107 } 95 case FINGER4: 96 { 97 break; 98 } 99 case VEE: 100 { 101 break; 102 } 103 case DIAMOND: 104 { 108 case FormationMode::FINGER4: 109 { 110 targetRelativePositionOfWingman = new Vector3 (-400, 0, -200); 111 break; 112 } 113 case FormationMode::VEE: 114 { 115 break; 116 } 117 case FormationMode::DIAMOND: 118 { 119 targetRelativePositionOfWingman = new Vector3 (400, -200, 0); 105 120 break; 106 121 } … … 127 142 { 128 143 //0ptr or not DivisionController? 129 if (!(it) || !((it)->getRank() == DIVISIONLEADER) || !(it->getControllableEntity()))144 if (!(it) || !((it)->getRank() == Rank::DIVISIONLEADER) || !(it->getControllableEntity())) 130 145 continue; 131 146 //same team?
Note: See TracChangeset
for help on using the changeset viewer.