- Timestamp:
- Apr 28, 2016, 3:09:26 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/sagerjFS16/src/orxonox/controllers/ArtificialController.cc
r11099 r11175 132 132 @brief DoFire is called when a bot should shoot and decides which weapon is used and whether the bot shoots at all. 133 133 */ 134 void ArtificialController::do Fire()134 void ArtificialController::doPush() 135 135 { 136 136 if(!this->bSetupWorked)//setup: find out which weapons are active ! hard coded: laser is "0", lens flare is "1", ... … … 144 144 if (this->isCloseAtTarget(130) && (firemode = getFiremode("LightningGun")) > -1 ) 145 145 {//LENSFLARE: short range weapon 146 this->getControllableEntity()-> fire(firemode); //ai uses lens flare if they're close enough to the target146 this->getControllableEntity()->push(firemode); //ai uses lens flare if they're close enough to the target 147 147 } 148 148 else if( this->isCloseAtTarget(400) && (random < this->botlevel_) && (firemode = getFiremode("RocketFire")) > -1 ) 149 149 {//ROCKET: mid range weapon 150 150 this->mode_ = ROCKET; //Vector-implementation: mode_.push_back(ROCKET); 151 this->getControllableEntity()-> fire(firemode); //launch rocket151 this->getControllableEntity()->push(firemode); //launch rocket 152 152 if(this->getControllableEntity() && this->target_) //after fire(3) is called, getControllableEntity() refers to the rocket! 153 153 { … … 161 161 } 162 162 else if ((firemode = getFiremode("HsW01")) > -1 ) //LASER: default weapon 163 this->getControllableEntity()-> fire(firemode);163 this->getControllableEntity()->push(firemode); 164 164 } 165 165 }
Note: See TracChangeset
for help on using the changeset viewer.