Changeset 10651 for code/branches/AI_HS15
- Timestamp:
- Oct 13, 2015, 6:11:01 PM (9 years ago)
- Location:
- code/branches/AI_HS15/src/orxonox/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/AIController.cc
r9667 r10651 44 44 { 45 45 RegisterObject(AIController); 46 47 46 this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&AIController::action, this))); 48 47 } … … 147 146 void AIController::tick(float dt) 148 147 { 148 149 149 if (!this->isActive()) 150 150 return; … … 256 256 //**********************************************NEW 257 257 void AIController::defaultBehaviour(float maxrand) 258 { float random; 258 { 259 if (!this->target_) 260 this->searchNewTarget(); 261 if (!(this->passive_) && (this->target_ && !this->bShooting_)) 262 this->bShooting_ = true; 263 /* 264 float random; 259 265 // search enemy 260 266 random = rnd(maxrand); … … 313 319 if (random < botlevel_*50 ) 314 320 this->boostControl(); 315 321 */ 322 323 316 324 // update Checkpoints 317 325 /*random = rnd(maxrand); … … 321 329 if (this->waypoints_.size() == 0 ) 322 330 this->manageWaypoints(); 331 332 323 333 } 324 334 -
code/branches/AI_HS15/src/orxonox/controllers/ArtificialController.h
r9667 r10651 74 74 75 75 float botlevel_; //<! Makes the level of a bot configurable. 76 //botLevel_ is never used in XML (so far), is it redundant? 76 77 enum Mode {DEFAULT, ROCKET, DEFENCE, MOVING};//TODO; implement DEFENCE, MOVING modes 77 78 Mode mode_; //TODO: replace single value with stack-like implementation: std::vector<Mode> mode_;
Note: See TracChangeset
for help on using the changeset viewer.