Index: code/branches/consolecommands3/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/branches/consolecommands3/src/orxonox/gamestates/GSMainMenu.cc	(revision 7204)
+++ code/branches/consolecommands3/src/orxonox/gamestates/GSMainMenu.cc	(revision 7219)
@@ -48,4 +48,18 @@
     DeclareGameState(GSMainMenu, "mainMenu", false, true);
 
+    static const std::string __CC_startStandalone_name      = "startGame";
+    static const std::string __CC_startServer_name          = "startServer";
+    static const std::string __CC_startClient_name          = "startClient";
+    static const std::string __CC_startDedicated_name       = "startDedicated";
+    static const std::string __CC_startMainMenu_name        = "startMainMenu";
+    static const std::string __CC_setMainMenuSoundPath_name = "setMMSoundPath";
+
+    _SetConsoleCommand(__CC_startStandalone_name,      &GSMainMenu::startStandalone).deactivate();
+    _SetConsoleCommand(__CC_startServer_name,          &GSMainMenu::startServer    ).deactivate();
+    _SetConsoleCommand(__CC_startClient_name,          &GSMainMenu::startClient    ).deactivate();
+    _SetConsoleCommand(__CC_startDedicated_name,       &GSMainMenu::startDedicated ).deactivate();
+    _SetConsoleCommand(__CC_startMainMenu_name,        &GSMainMenu::startMainMenu  ).deactivate();
+    _SetConsoleCommand(__CC_setMainMenuSoundPath_name, &GSMainMenu::setMainMenuSoundPath);
+
     GSMainMenu::GSMainMenu(const GameStateInfo& info)
         : GameState(info)
@@ -89,12 +103,10 @@
         InputManager::getInstance().enterState("MainMenuHackery");
 
-        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startStandalone), "startGame"));
-        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startServer), "startServer"));
-        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startClient), "startClient"));
-        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startDedicated), "startDedicated"));
-        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startMainMenu), "startMainMenu"));
-
-        // create command to change sound path
-        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::setMainMenuSoundPath, this), "setMMSoundPath"));
+        _ModifyConsoleCommand(__CC_startStandalone_name).activate();
+        _ModifyConsoleCommand(__CC_startServer_name    ).activate();
+        _ModifyConsoleCommand(__CC_startClient_name    ).activate();
+        _ModifyConsoleCommand(__CC_startDedicated_name ).activate();
+        _ModifyConsoleCommand(__CC_startMainMenu_name  ).activate();
+        _ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(this);
 
         KeyBinderManager::getInstance().setToDefault();
@@ -122,4 +134,11 @@
         GUIManager::hideGUI("MainMenu");
         GraphicsManager::getInstance().setCamera(0);
+
+        _ModifyConsoleCommand(__CC_startStandalone_name).deactivate();
+        _ModifyConsoleCommand(__CC_startServer_name    ).deactivate();
+        _ModifyConsoleCommand(__CC_startClient_name    ).deactivate();
+        _ModifyConsoleCommand(__CC_startDedicated_name ).deactivate();
+        _ModifyConsoleCommand(__CC_startMainMenu_name  ).deactivate();
+        _ModifyConsoleCommand(__CC_setMainMenuSoundPath_name).setObject(0);
     }
 
Index: code/branches/consolecommands3/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/branches/consolecommands3/src/orxonox/gamestates/GSRoot.cc	(revision 7204)
+++ code/branches/consolecommands3/src/orxonox/gamestates/GSRoot.cc	(revision 7219)
@@ -41,5 +41,11 @@
 {
     DeclareGameState(GSRoot, "root", false, false);
-    SetConsoleCommandShortcut(GSRoot, printObjects);
+
+    static const std::string __CC_setTimeFactor_name = "setTimeFactor";
+    static const std::string __CC_pause_name = "pause";
+
+    _SetConsoleCommand("printObjects", &GSRoot::printObjects);
+    _SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0);
+    _SetConsoleCommand(__CC_pause_name,         &GSRoot::pause        ).accessLevel(AccessLevel::Master);
 
     registerStaticNetworkFunction(&TimeFactorListener::setTimeFactor);
@@ -76,15 +82,12 @@
         TimeFactorListener::setTimeFactor(1.0f);
 
-        // time factor console command
-        ConsoleCommand* command = createConsoleCommand(createFunctor(&GSRoot::setTimeFactor, this), "setTimeFactor");
-        CommandExecutor::addConsoleCommandShortcut(command).accessLevel(AccessLevel::Offline).defaultValue(0, 1.0);
-
-        // time factor console command
-        command = createConsoleCommand(createFunctor(&GSRoot::pause, this), "pause");
-        CommandExecutor::addConsoleCommandShortcut(command).accessLevel(AccessLevel::Offline);
+        _ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(this);
+        _ModifyConsoleCommand(__CC_pause_name).setObject(this);
     }
 
     void GSRoot::deactivate()
     {
+        _ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0);
+        _ModifyConsoleCommand(__CC_pause_name).setObject(0);
     }
 
