Changeset 9256 for code/trunk/src
- Timestamp:
- May 28, 2012, 9:06:02 AM (13 years ago)
- Location:
- code/trunk/src/orxonox/controllers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/controllers/FormationController.cc
r9255 r9256 252 252 } 253 253 254 void FormationController::removeFromFormation() 254 //used, when slaves are in DEFEND mode. 255 void FormationController::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) 256 { 257 if (!this->formationFlight_ || this->state_!=MASTER || this->formationMode_!=DEFEND) return; 258 this->masterAttacked(originator); 259 } 260 261 void FormationController::removeFromFormation() 255 262 { 256 263 if (this->state_ == SLAVE || this->myMaster_) // slaves can also be temporary free, so check if myMaster_ is set -
code/trunk/src/orxonox/controllers/FormationController.h
r9255 r9256 96 96 { return this->formationMode_; } 97 97 98 protected: 98 virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage); 99 100 protected: 99 101 bool formationFlight_; 100 102 bool passive_; -
code/trunk/src/orxonox/controllers/HumanController.cc
r9016 r9256 85 85 HumanController::~HumanController() 86 86 { 87 if (HumanController::localController_s) 87 if (HumanController::localController_s) 88 88 { 89 89 HumanController::localController_s->removeFromFormation(); … … 197 197 HumanController::localController_s->keepBoosting(); 198 198 } 199 199 200 200 /** 201 201 @brief … … 302 302 orxout(message) <<"FormationFlight enabled "<< endl; 303 303 } 304 304 305 305 } 306 306 … … 332 332 } 333 333 334 335 //used, when slaves are in DEFEND mode.336 void HumanController::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage)337 {338 if (!this->formationFlight_ || this->state_!=MASTER || this->formationMode_!=DEFEND) return;339 this->masterAttacked(originator);340 }341 342 334 void HumanController::addBots(unsigned int amount) 343 335 { -
code/trunk/src/orxonox/controllers/HumanController.h
r9016 r9256 74 74 void keepBoosting(void); 75 75 void terminateBoosting(void); 76 76 77 77 78 78 static void greet(); … … 88 88 static void toggleFormationFlight(); 89 89 static void FFChangeMode(); 90 virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);91 92 90 93 91 static void addBots(unsigned int amount); … … 108 106 static HumanController* localController_s; 109 107 bool controlPaused_; 110 108 111 109 private: 112 110 bool boosting_; // Whether the HumanController is in boosting mode or not.
Note: See TracChangeset
for help on using the changeset viewer.