Changeset 10882 for code/branches/campaignHS15/src/orxonox
- Timestamp:
- Nov 28, 2015, 10:16:31 AM (9 years ago)
- Location:
- code/branches/campaignHS15/src/orxonox/controllers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc
r10881 r10882 364 364 (this->getProtect()->getWorldOrientation()* (targetRelativePosition))); 365 365 this->setTargetPosition(targetAbsolutePosition); 366 this->actionCounter_ += this->actionCounter_ < 100000 ? 1 : -this->actionCounter_ ; 367 if (this->actionConter_ % 3 == 0) 366 if (this->actionCounter_ % 3 == 0) 368 367 this->setTargetOrientation(this->getProtect()->getWorldOrientation()); 369 368 } … … 387 386 } 388 387 this->setAction(Action::NONE); 388 this->bHasTargetPosition_ = false; 389 389 } 390 390 void ActionpointController::moveBackToTop() … … 419 419 return; 420 420 // orxout (internal_error) << "Size of actions is " << this->parsedActionpoints_.size() << endl; 421 this->startAttackingEnemiesThatAreClose(); 421 if (this->actionCounter_ % 5 == 0) 422 this->startAttackingEnemiesThatAreClose(); 422 423 //No action -> pop one from stack 423 424 if (this->action_ == Action::NONE || this->bTakenOver_) … … 427 428 Point p = { Action::FIGHTALL, "", Vector3::ZERO, false }; 428 429 this->parsedActionpoints_.push_back (p); 430 429 431 } 430 432 this->executeActionpoint(); 431 433 this->bTakenOver_ = false; 434 this->action(); 432 435 } 433 436 //Action fightall -> fight till nobody alive … … 445 448 { 446 449 this->nextActionpoint(); 447 return; 450 451 if (!(this->parsedActionpoints_.empty() && this->loopActionpoints_.empty())) 452 { 453 this->action(); 454 } 455 448 456 } 449 457 } … … 468 476 { 469 477 this->nextActionpoint(); 470 return;478 this->action(); 471 479 } 472 480 } … … 488 496 { 489 497 this->nextActionpoint(); 490 return;498 this->action(); 491 499 } 492 500 } … … 498 506 { 499 507 this->nextActionpoint(); 500 return;508 this->action(); 501 509 } 502 510 } … … 505 513 if (!this->getProtect()) 506 514 { 507 this->nextActionpoint(); 508 return;515 this->nextActionpoint(); 516 this->action(); 509 517 } 510 518 this->stayNearProtect(); … … 515 523 { 516 524 this->nextActionpoint(); 517 return;525 this->action(); 518 526 } 519 527 } … … 525 533 this->bShooting_ = this->canFire(); 526 534 } 535 this->actionCounter_ += this->actionCounter_ < 100000 ? 1 : -this->actionCounter_ ; 536 527 537 } 528 538 void ActionpointController::takeActionpoints (std::vector<Point > vector, std::vector<Point > loop, bool b) -
code/branches/campaignHS15/src/orxonox/controllers/DivisionController.cc
r10881 r10882 117 117 { 118 118 this->myFollower_ = newFollower; 119 if (this->hasWingman()) 120 { 121 this->myWingman_->takeActionpoints (std::vector<Point>(), std::vector<Point>(), false); 122 } 119 123 return true; 120 124 } … … 135 139 if (this->myFollower_) 136 140 return true; 137 else138 141 142 return false; 139 143 } 140 144 } -
code/branches/campaignHS15/src/orxonox/controllers/FlyingController.cc
r10881 r10882 39 39 this->rotationProgress_ = 0; 40 40 this->spread_ = 200; 41 this->tolerance_ = 80;41 this->tolerance_ = 60; 42 42 RegisterObject( FlyingController ); 43 43 }
Note: See TracChangeset
for help on using the changeset viewer.