Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 27, 2011, 3:58:04 PM (14 years ago)
Author:
jo
Message:

Now the ai use lensflare if the weapon is on board and if they are close enough to the target. Hardcoded version!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ai/src/orxonox/controllers/AIController.cc

    r7284 r7832  
    220220                    this->moveToTargetPosition();
    221221
    222                 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(math::pi / 20.0f))
    223                     this->getControllableEntity()->fire(0);
     222                this->doFire();
    224223            }
    225224
     
    241240        }
    242241
    243          if (this->state_ == FREE)
     242        if (this->state_ == FREE)
    244243        {
    245244            if (this->target_)
     
    253252                this->moveToTargetPosition();
    254253
    255             if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(math::pi / 20.0f))
    256                 this->getControllableEntity()->fire(0);
     254            this->doFire();
    257255        }
    258256
Note: See TracChangeset for help on using the changeset viewer.