- Timestamp:
- Oct 2, 2009, 8:58:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/controllers/ArtificialController.cc
r5738 r5861 46 46 this->bHasTargetPosition_ = false; 47 47 this->targetPosition_ = Vector3::ZERO; 48 49 this->target_.setCallback(createFunctor(&ArtificialController::targetDied, this)); 48 50 } 49 51 … … 162 164 } 163 165 164 void ArtificialController::destroyedPawn(Pawn* ship) 165 { 166 if (ship == this->target_) 167 { 168 this->forgetTarget(); 169 this->searchRandomTargetPosition(); 170 } 166 void ArtificialController::abandonTarget(Pawn* target) 167 { 168 if (target == this->target_) 169 this->targetDied(); 170 } 171 172 void ArtificialController::targetDied() 173 { 174 this->forgetTarget(); 175 this->searchRandomTargetPosition(); 171 176 } 172 177
Note: See TracChangeset
for help on using the changeset viewer.