Changeset 8764 for code/branches
- Timestamp:
- Jul 18, 2011, 11:07:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai2/src/orxonox/controllers/ArtificialController.cc
r8763 r8764 1046 1046 int firemode; 1047 1047 float random = rnd(1);// 1048 if (this->isCloseAtTarget(130) && (firemode = getFiremode("LightningGun")) >-1 )1048 if (this->isCloseAtTarget(130) && (firemode = getFiremode("LightningGun")) > -1 ) 1049 1049 {//LENSFLARE: short range weapon 1050 1050 this->getControllableEntity()->fire(firemode); //ai uses lens flare if they're close enough to the target 1051 1051 } 1052 else if( this->isCloseAtTarget(400) && (random < this->botlevel_) && (firemode = getFiremode("RocketFire") >-1))1052 else if( this->isCloseAtTarget(400) && (random < this->botlevel_) && (firemode = getFiremode("RocketFire")) > -1 ) 1053 1053 {//ROCKET: mid range weapon 1054 1054 this->mode_ = ROCKET; //Vector-implementation: mode_.push_back(ROCKET); … … 1064 1064 this->timeout_ = 4.0f; //TODO: find better default value 1065 1065 } 1066 else if ((firemode = getFiremode("HsW01") >-1)) //LASER: default weapon1066 else if ((firemode = getFiremode("HsW01")) > -1 ) //LASER: default weapon 1067 1067 this->getControllableEntity()->fire(firemode); 1068 1068 }
Note: See TracChangeset
for help on using the changeset viewer.