- Timestamp:
- May 30, 2010, 11:54:45 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ai/src/orxonox/controllers/ArtificialController.cc
r6997 r7029 91 91 92 92 XMLPortParam(ArtificialController, "team", setTeam, getTeam, xmlelement, mode).defaultValues(-1); 93 XMLPortParam(ArtificialController, "formation", setFormationFlight, getFormationFlight, xmlelement, mode).defaultValues(true); 94 } 95 96 // Documentation only here to get a faster overview for creating a useful documentation, what you're reading here not intended for an actual documentation... 93 XMLPortParam(ArtificialController, "formationflight", setFormationFlight, getFormationFlight, xmlelement, mode).defaultValues(true); 94 XMLPortParam(ArtificialController, "formation_size", setFormationSize, getFormationSize, xmlelement, mode).defaultValues(STANDARD_MAX_FORMATION_SIZE); 95 } 96 97 // Documentation only here to get a faster overview for creating a useful documentation... 97 98 98 99 /** … … 231 232 232 233 /** 233 @brief Gets called if ControllableEntity ischanged. Resets the bot when it dies.234 @brief Gets called when ControllableEntity is being changed. Resets the bot when it dies. 234 235 */ 235 236 void ArtificialController::changedControllableEntity() … … 473 474 474 475 /** 475 @brief Master sets its slaves free for \var FREEDOM_COUNT seconds.476 @brief Master sets its slaves free for @var FREEDOM_COUNT seconds. 476 477 */ 477 478 void ArtificialController::forceFreeSlaves() … … 564 565 void ArtificialController::spinInit() 565 566 { 566 567 COUT(0) << "~spinInit" << std::endl; 567 568 if(this->state_ != MASTER) return; 568 569 this->specificMasterAction_ = SPIN; … … 582 583 @brief Master begins to follow a human player. Is a "specific master action". 583 584 @param humanController human to follow. 584 @param alaways follows human forever if true - only inplemented for false yet. 585 */ 586 void ArtificialController::followHuman(Pawn* human, bool always) 587 { 588 if (human == NULL) 589 { 590 this->specificMasterAction_ = NONE; 585 @param alaways follows human forever if true, else it follows it for @var SECONDS_TO_FOLLOW_HUMAN seconds. 586 */ 587 void ArtificialController::followHumanInit(Pawn* human, bool always) 588 { 589 COUT(0) << "~followInit" << std::endl; 590 if (human == NULL || this->state_ != MASTER) 591 591 return; 592 } 592 593 this->specificMasterAction_ = FOLLOWHUMAN; 594 595 this->setTarget(human); 593 596 if (!always) 594 {595 this->setTarget(human);596 597 this->specificMasterActionHoldCount_ = SECONDS_TO_FOLLOW_HUMAN; 597 this->specificMasterAction_ = HOLD; 598 } 599 600 } 598 else 599 this->specificMasterActionHoldCount_ = INT_MAX; //for now... 600 601 } 602 603 /** 604 @brief Follows target with adjusted speed. Called within tick. 605 */ 606 void ArtificialController::follow() 607 { 608 this->moveToTargetPosition(); //standard position apprach for now. 609 } 610 601 611 602 612
Note: See TracChangeset
for help on using the changeset viewer.