- Timestamp:
- Apr 12, 2010, 4:52:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai/src/orxonox/controllers/ArtificialController.cc
r6695 r6696 132 132 if (static_cast<ControllableEntity*>(*it) != this->getControllableEntity()) //&& it->getPosition().squaredDistance(this->getControllableEntity()->getPosition()) < 1000 133 133 { 134 if(controller->slaves.size() > 9) continue; 135 136 this->freeAllSlaves(); 137 this->slaves.clear(); 134 138 this->state_ = SLAVE; 139 135 140 this->myMaster_ = controller; 136 141 controller->slaves.push_back(this); 142 137 143 break; 138 144 } … … 170 176 { 171 177 178 179 for(std::list<ArtificialController*>::iterator it = slaves.begin(); it != slaves.end(); it++) 180 { 181 (*it)->state_ = FREE; 182 } 183 /* 172 184 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) 173 185 { … … 178 190 controller->state_ = FREE; 179 191 } 180 181 } 182 192 */ 193 } 194 195 void ArtificialController::loseMasterState() 196 { 197 this->freeAllSlaves(); 198 this->state_ = FREE; 199 } 183 200 184 201 void ArtificialController::setTargetPosition(const Vector3& target)
Note: See TracChangeset
for help on using the changeset viewer.