- Timestamp:
- Dec 7, 2015, 8:34:20 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/WingmanController.cc
r10915 r10923 70 70 if (!this->myLeader_) 71 71 { 72 if (this->actionTime_ == 2.0f)72 /*if (this->actionTime_ == 2.0f) 73 73 { 74 74 if (this->timeOffset_ >= 0.0f && this->timeOffset_ <= 0.8f && !this->bActionCalled_) … … 93 93 this->bActionCalled_ = false; 94 94 } 95 } 95 }*/ 96 96 } 97 97 else 98 98 { 99 if (this->timeOffset_ >= this->actionTime_ && this->timeOffset_ <= this->actionTime_ + 0.4f && !this->bActionCalled_)99 /* if (this->timeOffset_ >= this->actionTime_ && this->timeOffset_ <= this->actionTime_ + 0.4f && !this->bActionCalled_) 100 100 { 101 101 this->action(); … … 105 105 { 106 106 this->bActionCalled_ = false; 107 } 107 }*/ 108 108 } 109 109 … … 114 114 void WingmanController::action() 115 115 { 116 116 if (!this || !this->getControllableEntity()) 117 return; 117 118 //----If no leader, find one---- 118 119 if (!this->myLeader_) … … 122 123 if (this->myLeader_) 123 124 { 124 //spread copyOrientation called equally among the division 125 if (this->myLeader_->getIdentifier()->getName() == "SectionController") 126 this->actionCounter_ = 1; 127 else 128 this->actionCounter_ = 4; 125 129 126 } 130 127 } … … 137 134 { 138 135 ActionpointController::action(); 136 if (!this || !this->getControllableEntity()) 137 return; 138 139 139 } 140 140 else if (this->myLeader_) … … 170 170 } 171 171 } 172 this->actionCounter_ += this->actionCounter_ < 100000 ? 1 : -this->actionCounter_ ;173 172 } 174 173
Note: See TracChangeset
for help on using the changeset viewer.