Changeset 6356 for code/branches/presentation2/src/orxonox/controllers
- Timestamp:
- Dec 15, 2009, 11:04:39 PM (15 years ago)
- Location:
- code/branches/presentation2/src/orxonox/controllers
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/orxonox/controllers/Controller.cc
r6108 r6356 41 41 this->player_ = 0; 42 42 this->controllableEntity_ = 0; 43 this->bGodMode_ = false; 43 44 } 44 45 -
code/branches/presentation2/src/orxonox/controllers/Controller.h
r6295 r6356 51 51 52 52 virtual inline void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {}; 53 54 void setGodMode( bool mode ){ this->bGodMode_ = mode; } 55 bool getGodMode(){ return this->bGodMode_; } 53 56 54 57 inline ControllableEntity* getControllableEntity() const … … 70 73 PlayerInfo* player_; 71 74 ControllableEntity* controllableEntity_; 75 private: 76 bool bGodMode_; 72 77 }; 73 78 } -
code/branches/presentation2/src/orxonox/controllers/HumanController.cc
r6195 r6356 54 54 SetConsoleCommand(HumanController, mouseLook, true); 55 55 SetConsoleCommand(HumanController, suicide, true); 56 SetConsoleCommand(HumanController, toggleGodMode, true); 56 57 SetConsoleCommand(HumanController, addBots, true).defaultValues(1); 57 58 SetConsoleCommand(HumanController, killBots, true).defaultValues(0); … … 209 210 } 210 211 212 void HumanController::toggleGodMode() 213 { 214 HumanController::getLocalControllerSingleton()->setGodMode( !HumanController::getLocalControllerSingleton()->getGodMode() ); 215 } 216 211 217 void HumanController::useItem() 212 218 { -
code/branches/presentation2/src/orxonox/controllers/HumanController.h
r6199 r6356 74 74 75 75 static void suicide(); 76 static void toggleGodMode(); 76 77 77 78 static void addBots(unsigned int amount);
Note: See TracChangeset
for help on using the changeset viewer.