Changeset 9622 for code/branches/formationupdate/src/orxonox
- Timestamp:
- May 14, 2013, 2:32:37 PM (12 years ago)
- Location:
- code/branches/formationupdate/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/formationupdate/src/orxonox/controllers/HumanController.cc
r9256 r9622 102 102 103 103 // commandslaves when Master of a formation 104 if (HumanController::localController_s && HumanController::localController_s->state_==MASTER )104 if (HumanController::localController_s && HumanController::localController_s->state_==MASTER && FormationController::slaves_.size() > 0) 105 105 { 106 106 if (HumanController::localController_s->formationMode_ != ATTACK) -
code/branches/formationupdate/src/orxonox/worldentities/pawns/Pawn.cc
r9621 r9622 358 358 ControllableEntity* entity = slave->getControllableEntity(); 359 359 360 // delete the AIController 361 slave->setControllableEntity(0); 362 363 // set a new master within the formation 364 orxonox_cast<FormationController*>(this->getController())->setNewMasterWithinFormation(orxonox_cast<FormationController*>(slave)); 365 366 // start to control a slave 367 this->getPlayer()->startControl(entity); 360 361 if(!entity->hasHumanController()) 362 { 363 // delete the AIController 364 slave->setControllableEntity(0); 365 366 // set a new master within the formation 367 orxonox_cast<FormationController*>(this->getController())->setNewMasterWithinFormation(orxonox_cast<FormationController*>(slave)); 368 369 // start to control a slave 370 this->getPlayer()->startControl(entity); 371 } 372 else 373 { 374 this->getPlayer()->stopControl(); 375 } 376 368 377 } 369 378 else
Note: See TracChangeset
for help on using the changeset viewer.