- Timestamp:
- Dec 7, 2015, 3:14:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc
r10925 r10935 39 39 { 40 40 RegisterObject(WingmanController); 41 //this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&WingmanController::action, this)));42 41 this->myLeader_ = 0; 43 42 this->bFirstAction_ = true; … … 68 67 69 68 SUPER(WingmanController, tick, dt); 70 if (!this->myLeader_)71 {72 /*if (this->actionTime_ == 2.0f)73 {74 if (this->timeOffset_ >= 0.0f && this->timeOffset_ <= 0.8f && !this->bActionCalled_)75 {76 this->action();77 this->bActionCalled_ = true;78 }79 if (this->timeOffset_ > 1.6f)80 {81 this->bActionCalled_ = false;82 }83 }84 else85 {86 if (this->timeOffset_ > 0.8f && this->timeOffset_ <= 1.6f && !this->bActionCalled_)87 {88 this->action();89 this->bActionCalled_ = true;90 }91 if (this->timeOffset_ > 2.0f)92 {93 this->bActionCalled_ = false;94 }95 }*/96 }97 else98 {99 /* if (this->timeOffset_ >= this->actionTime_ && this->timeOffset_ <= this->actionTime_ + 0.4f && !this->bActionCalled_)100 {101 this->action();102 this->bActionCalled_ = true;103 }104 if (this->timeOffset_ <= 0.5f)105 {106 this->bActionCalled_ = false;107 }*/108 }109 110 69 111 70 } … … 157 116 this->setTarget(this->myLeader_->getTarget()); 158 117 } 159 if (this->hasTarget()) 160 { 161 // this->maneuver(); 162 // this->bShooting_ = this->canFire(); 163 // Vector3 healthPosition = bestHealthPickup((this->target_->getWorldPosition() - this->getControllableEntity()->getWorldPosition()).length()); 164 // if ((this->getControllableEntity()->getWorldPosition() - healthPosition).length() < this->tolerance_) 165 // { 166 // //----choose where to go---- 167 // this->maneuver(); 168 // } 169 // else 170 // { 171 // this->dodgeTowards(healthPosition); 172 // } 173 // //----fire if you can---- 174 // this->bShooting_ = this->canFire(); 175 } 118 176 119 } 177 120 }
Note: See TracChangeset
for help on using the changeset viewer.