Changeset 6695 for code/branches/ai/src/orxonox/controllers/AIController.cc
- Timestamp:
- Apr 12, 2010, 4:18:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai/src/orxonox/controllers/AIController.cc
r6683 r6695 50 50 { 51 51 if (this->state_ == MASTER) freeAllSlaves(); 52 if (this->state_ == SLAVE) unregisterSlave(); 53 this->slaves.clear(); 52 54 } 53 55 … … 60 62 { 61 63 64 //this->state_ = MASTER; 62 65 // search master 63 random = rnd(maxrand);64 if (random < 50&& (!this->target_))66 //random = rnd(maxrand); 67 //if (random < 101 && (!this->target_)) 65 68 this->searchNewMaster(); 66 67 68 69 69 70 } … … 78 79 // command slaves 79 80 this->commandSlaves(); 81 80 82 // search enemy 81 83 random = rnd(maxrand); … … 130 132 this->aimAtTarget(); 131 133 132 /*if (this->bHasTargetPosition_)134 if (this->bHasTargetPosition_) 133 135 this->moveToTargetPosition(); 134 */ 136 135 137 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f)) 136 138 this->getControllableEntity()->fire(0); 137 139 } 138 140 139 if (this->state_ ==SLAVE)141 if (this->state_ == SLAVE) 140 142 { 141 143
Note: See TracChangeset
for help on using the changeset viewer.