Changeset 6978 for code/branches/ai/src/orxonox/controllers/AIController.cc
- Timestamp:
- May 27, 2010, 6:39:59 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai/src/orxonox/controllers/AIController.cc
r6919 r6978 23 23 * Fabian 'x3n' Landau 24 24 * Co-authors: 25 * ...25 * Dominik Solenicki 26 26 * 27 27 */ … … 61 61 if (this->formationFlight_) 62 62 { 63 // return to Master after being forced free63 // return to Master after being forced free 64 64 if (this->freedomCount_ == 1) 65 65 { … … 103 103 this->searchRandomTargetPosition(); 104 104 105 /* 106 random = rnd(maxrand); 107 if ( random < 75 && (this->target_ && !this->bShooting_))105 // shoot 106 random = rnd(maxrand); 107 if (!(this->passive_) && random < 75 && (this->target_ && !this->bShooting_)) 108 108 this->bShooting_ = true; 109 109 … … 111 111 random = rnd(maxrand); 112 112 if (random < 25 && (this->bShooting_)) 113 this->bShooting_ = false; */113 this->bShooting_ = false; 114 114 115 115 } … … 120 120 } 121 121 122 if (this->state_ == MASTER) //MASTER122 if (this->state_ == MASTER) 123 123 { 124 124 … … 136 136 if (this->specificMasterAction_ == SPIN) 137 137 this->spin(); 138 139 // if (this->specificMasterAction_ == FOLLOWHUMAN) 140 // this->followHuman(this->HumanToFollow_, false); 138 141 } 139 142 … … 188 191 // shoot 189 192 random = rnd(maxrand); 190 if ( random <5 && (this->target_ && !this->bShooting_))193 if (!(this->passive_) && random < 15 && (this->target_ && !this->bShooting_)) 191 194 { 192 195 this->bShooting_ = true;
Note: See TracChangeset
for help on using the changeset viewer.