Changeset 7842 for code/branches/ai/src/orxonox/controllers/AIController.cc
- Timestamp:
- Jan 31, 2011, 11:36:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai/src/orxonox/controllers/AIController.cc
r7840 r7842 76 76 // search enemy 77 77 random = rnd(maxrand); 78 if (random < (15 + botlevel_* 2 ) && (!this->target_))78 if (random < (15 + botlevel_* 20) && (!this->target_)) 79 79 this->searchNewTarget(); 80 80 81 81 // forget enemy 82 82 random = rnd(maxrand); 83 if (random < ( 5/botlevel_) && (this->target_))83 if (random < ((1-botlevel_)*5) && (this->target_)) 84 84 this->forgetTarget(); 85 85 86 86 // next enemy 87 87 random = rnd(maxrand); 88 if (random < ( 10 + botlevel_) && (this->target_))88 if (random < ((1+ botlevel_)*10) && (this->target_)) 89 89 this->searchNewTarget(); 90 90 … … 106 106 // shoot 107 107 random = rnd(maxrand); 108 if (!(this->passive_) && random < (75 + botlevel_* 3) && (this->target_ && !this->bShooting_))108 if (!(this->passive_) && random < (75 + botlevel_*25) && (this->target_ && !this->bShooting_)) 109 109 this->bShooting_ = true; 110 110 111 111 // stop shooting 112 112 random = rnd(maxrand); 113 if (random < ( 25 - botlevel_*2) && (this->bShooting_))113 if (random < ((1 - botlevel_)*25) && (this->bShooting_)) 114 114 this->bShooting_ = false; 115 115 … … 192 192 // stop shooting 193 193 random = rnd(maxrand); 194 if (random < ( 25 - botlevel_*2) && (this->bShooting_))194 if (random < ( (1- botlevel_)*25 ) && (this->bShooting_)) 195 195 this->bShooting_ = false; 196 196
Note: See TracChangeset
for help on using the changeset viewer.