Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8764 for code/branches


Ignore:
Timestamp:
Jul 18, 2011, 11:07:05 PM (13 years ago)
Author:
jo
Message:

Got the bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai2/src/orxonox/controllers/ArtificialController.cc

    r8763 r8764  
    10461046            int firemode;
    10471047            float random = rnd(1);//
    1048             if (this->isCloseAtTarget(130) && (firemode = getFiremode("LightningGun"))>-1 )
     1048            if (this->isCloseAtTarget(130) && (firemode = getFiremode("LightningGun")) > -1 )
    10491049            {//LENSFLARE: short range weapon
    10501050                this->getControllableEntity()->fire(firemode); //ai uses lens flare if they're close enough to the target
    10511051            }
    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 )
    10531053            {//ROCKET: mid range weapon
    10541054                this->mode_ = ROCKET; //Vector-implementation: mode_.push_back(ROCKET);
     
    10641064                    this->timeout_ = 4.0f; //TODO: find better default value
    10651065            }
    1066             else if ((firemode = getFiremode("HsW01")>-1)) //LASER: default weapon
     1066            else if ((firemode = getFiremode("HsW01")) > -1 ) //LASER: default weapon
    10671067                this->getControllableEntity()->fire(firemode);
    10681068        }
Note: See TracChangeset for help on using the changeset viewer.