- Timestamp:
- Dec 17, 2008, 2:10:11 AM (15 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
/code/branches/weapon2 (added) merged: 2108,2145,2186,2203,2232,2272-2273,2288,2308,2319,2327,2331,2337,2347,2354,2366-2368,2379,2391,2393,2398,2410
- Property svn:mergeinfo changed
-
code/branches/presentation/src/orxonox/objects/controllers/AIController.cc
r2485 r2493 57 57 float random; 58 58 float maxrand = 100.0f / ACTION_INTERVAL; 59 /* 59 60 60 // search enemy 61 61 random = rnd(maxrand); … … 72 72 if (random < 10 && (this->target_)) 73 73 this->searchNewTarget(); 74 */ 74 75 75 // fly somewhere 76 76 random = rnd(maxrand); … … 87 87 if (random < 30 && (this->bHasTargetPosition_ && !this->target_)) 88 88 this->searchRandomTargetPosition(); 89 /* 89 90 90 // shoot 91 91 random = rnd(maxrand); … … 97 97 if (random < 25 && (this->bShooting_)) 98 98 this->bShooting_ = false; 99 */100 99 } 101 100 … … 112 111 113 112 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(500) && this->isLookingAtTarget(Ogre::Math::PI / 20.0)) 114 this->getControllableEntity()->fire( );113 this->getControllableEntity()->fire(WeaponMode::fire); 115 114 116 115 SUPER(AIController, tick, dt);
Note: See TracChangeset
for help on using the changeset viewer.