Changeset 9617 for code/branches/formationupdate/src/orxonox/worldentities
- Timestamp:
- Apr 30, 2013, 3:12:11 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/formationupdate/src/orxonox/worldentities/pawns/Pawn.cc
r9616 r9617 314 314 bool Pawn::hasSlaves() 315 315 { 316 316 for (ObjectList<FormationController>::iterator it = 317 317 ObjectList<FormationController>::begin(); 318 318 it != ObjectList<FormationController>::end(); ++it ) … … 327 327 Controller* Pawn::getSlave(){ 328 328 for (ObjectList<FormationController>::iterator it = 329 330 329 ObjectList<FormationController>::begin(); 330 it != ObjectList<FormationController>::end(); ++it ) 331 331 { 332 332 if (this->hasHumanController() && it->getMaster() == this->getPlayer()->getController()) … … 360 360 ControllableEntity* entity = slave->getControllableEntity(); 361 361 362 // delete the AIController 363 slave->setControllableEntity(0); 364 365 362 366 // set new Master 363 orxonox_cast<FormationController*>(slave)->takeLeadOfFormation(); 367 orxonox_cast<FormationController*>(this->getController())->loseMasterState(); 368 364 369 365 370 … … 368 373 * 369 374 */ 370 //slave->getPlayer()->stopControl();371 375 372 376 // start to control a slave 373 377 this->getPlayer()->startControl(entity); 378 379 //orxonox_cast<FormationController*>(this->getController())->takeLeadOfFormation(); 380 374 381 } 375 382 else
Note: See TracChangeset
for help on using the changeset viewer.