- Timestamp:
- Dec 16, 2011, 4:56:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/formation/src/orxonox/controllers/HumanController.cc
r8990 r8991 106 106 if (HumanController::localController_s && HumanController::localController_s->state_==MASTER) 107 107 { 108 if (HumanController::localController_s-> mode_!=ATTACK)108 if (HumanController::localController_s->formationMode_ != ATTACK) 109 109 HumanController::localController_s->commandSlaves(); 110 110 } … … 177 177 HumanController::localController_s->controllableEntity_->fire(firemode); 178 178 //if human fires, set slaves free. See FormationController::forceFreeSlaves() 179 if (HumanController::localController_s->state_==MASTER && HumanController::localController_s-> mode_==NORMAL)179 if (HumanController::localController_s->state_==MASTER && HumanController::localController_s->formationMode_ == NORMAL) 180 180 { 181 181 HumanController::localController_s->forceFreeSlaves(); … … 317 317 if (HumanController::localController_s && HumanController::localController_s->state_==MASTER) 318 318 { 319 switch (HumanController::localController_s->get Mode()) {319 switch (HumanController::localController_s->getFormationMode()) { 320 320 case NORMAL: 321 HumanController::localController_s->set Mode(DEFEND);321 HumanController::localController_s->setFormationMode(DEFEND); 322 322 orxout(message) <<"Mode: DEFEND "<< endl; 323 323 break; 324 324 case DEFEND: 325 HumanController::localController_s->set Mode(ATTACK);325 HumanController::localController_s->setFormationMode(ATTACK); 326 326 orxout(message) <<"Mode: ATTACK "<< endl; 327 327 break; 328 328 case ATTACK: 329 HumanController::localController_s->set Mode(NORMAL);329 HumanController::localController_s->setFormationMode(NORMAL); 330 330 orxout(message) <<"Mode: NORMAL "<< endl; 331 331 break; 332 default: //catch all non-formation related states333 break;334 332 } 335 333 } … … 340 338 void HumanController::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) 341 339 { 342 if (!this->formationFlight_ || this->state_!=MASTER || this-> mode_!=DEFEND) return;340 if (!this->formationFlight_ || this->state_!=MASTER || this->formationMode_!=DEFEND) return; 343 341 this->masterAttacked(originator); 344 342 }
Note: See TracChangeset
for help on using the changeset viewer.