Changeset 7935 for code/branches/usability/src/orxonox
- Timestamp:
- Feb 20, 2011, 5:29:02 PM (14 years ago)
- Location:
- code/branches/usability/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/src/orxonox/gamestates/GSRoot.cc
r7284 r7935 43 43 44 44 static const std::string __CC_setTimeFactor_name = "setTimeFactor"; 45 static const std::string __CC_setPause_name = "setPause"; 45 46 static const std::string __CC_pause_name = "pause"; 46 47 47 48 SetConsoleCommand("printObjects", &GSRoot::printObjects).hide(); 48 49 SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0); 50 SetConsoleCommand(__CC_setPause_name, &GSRoot::setPause ).accessLevel(AccessLevel::Master).hide(); 49 51 SetConsoleCommand(__CC_pause_name, &GSRoot::pause ).accessLevel(AccessLevel::Master); 50 52 … … 83 85 84 86 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(this); 87 ModifyConsoleCommand(__CC_setPause_name).setObject(this); 85 88 ModifyConsoleCommand(__CC_pause_name).setObject(this); 86 89 } … … 89 92 { 90 93 ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0); 94 ModifyConsoleCommand(__CC_setPause_name).setObject(0); 91 95 ModifyConsoleCommand(__CC_pause_name).setObject(0); 92 96 } … … 157 161 } 158 162 163 void GSRoot::setPause(bool pause) 164 { 165 if (GameMode::isMaster()) 166 { 167 if (pause != this->bPaused_) 168 this->pause(); 169 } 170 } 171 159 172 void GSRoot::changedTimeFactor(float factor_new, float factor_old) 160 173 { -
code/branches/usability/src/orxonox/gamestates/GSRoot.h
r7172 r7935 51 51 // when taking the function address. 52 52 void setTimeFactor(float factor); 53 void setPause(bool pause); 53 54 void pause(); 54 55
Note: See TracChangeset
for help on using the changeset viewer.