- Timestamp:
- Dec 7, 2015, 8:34:20 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/SectionController.cc
r10915 r10923 74 74 75 75 SUPER(SectionController, tick, dt); 76 if (this->timeOffset_ > 0.8f && this->timeOffset_ <= 1.6f && !this->bActionCalled_)76 /*if (this->timeOffset_ > 0.8f && this->timeOffset_ <= 1.6f && !this->bActionCalled_) 77 77 { 78 78 this->action(); … … 82 82 { 83 83 this->bActionCalled_ = false; 84 } 84 }*/ 85 85 86 86 } … … 97 97 this->myDivisionLeader_ = newDivisionLeader; 98 98 //spread copyOrientation called equally among the division 99 if (this->myDivisionLeader_) 100 { 101 this->actionCounter_ = 5; 102 } 99 103 100 } 104 101 //----If have leader---- … … 156 153 } 157 154 158 this->actionCounter_ += this->actionCounter_ < 100000 ? 1 : -this->actionCounter_ ;159 155 } 160 156 … … 166 162 //----If division leader fights, cover him by fighting emenies close to his target---- 167 163 Action::Value action = this->myDivisionLeader_->getAction(); 168 169 Pawn* target; 164 170 165 if (action == Action::FIGHT || action == Action::FIGHTALL || action == Action::ATTACK) 171 166 { 167 Pawn* target; 172 168 //----if he has a target---- 173 169 if (this->myDivisionLeader_->hasTarget()) … … 177 173 !( this->hasTarget() && this->getTarget() != this->myDivisionLeader_->getTarget() ) ) 178 174 { 179 180 175 bool foundTarget = false; 181 176 //----new target should be close to division's target----
Note: See TracChangeset
for help on using the changeset viewer.