Index: code/trunk/src/core/Game.cc
===================================================================
--- code/trunk/src/core/Game.cc	(revision 3068)
+++ code/trunk/src/core/Game.cc	(revision 3084)
@@ -185,5 +185,15 @@
             for (std::vector<GameState*>::const_iterator it = this->activeStates_.begin();
                 it != this->activeStates_.end(); ++it)
+            {
+                // Add tick time for most of the states
+                uint64_t timeBeforeTick;
+                if ((*it)->getCountTickTime())
+                    timeBeforeTick = this->gameClock_->getRealMicroseconds();
+                
                 (*it)->update(*this->gameClock_);
+
+                if ((*it)->getCountTickTime())
+                    this->addTickTime(this->gameClock_->getRealMicroseconds() - timeBeforeTick);
+            }
 
             // STATISTICS
Index: code/trunk/src/core/Game.h
===================================================================
--- code/trunk/src/core/Game.h	(revision 3068)
+++ code/trunk/src/core/Game.h	(revision 3084)
@@ -43,6 +43,11 @@
 #include "OrxonoxClass.h"
 
-#define AddGameState(classname, name) \
-    static bool MACRO_CONCATENATE(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(name))
+/**
+@def
+    Adds a new GameState to the Game. The second parameter is the name as string
+    and every following paramter is a constructor argument (which is usually non existent)
+*/
+#define AddGameState(classname, ...) \
+    static bool MACRO_CONCATENATE(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(__VA_ARGS__))
 
 // tolua_begin
Index: code/trunk/src/core/GameState.cc
===================================================================
--- code/trunk/src/core/GameState.cc	(revision 3068)
+++ code/trunk/src/core/GameState.cc	(revision 3084)
@@ -45,6 +45,7 @@
         Constructor only initialises variables and sets the name permanently.
     */
-    GameState::GameState(const std::string& name)
+    GameState::GameState(const std::string& name, bool countTickTime)
         : name_(name)
+        , bCountTickTime_(countTickTime)
         , parent_(0)
     {
Index: code/trunk/src/core/GameState.h
===================================================================
--- code/trunk/src/core/GameState.h	(revision 3068)
+++ code/trunk/src/core/GameState.h	(revision 3084)
@@ -78,10 +78,12 @@
 
     public:
-        GameState(const std::string& name);
+        GameState(const std::string& name, bool countTicktime = true);
         virtual ~GameState();
 
         const std::string& getName() const { return name_; }
-        State getActivity() const    { return this->activity_; }
-        GameState* getParent() const       { return this->parent_; }
+        State getActivity()          const { return this->activity_; }
+        GameState* getParent()       const { return this->parent_; }
+
+        bool getCountTickTime()      const { return this->bCountTickTime_; }
 
         void addChild(GameState* state);
@@ -102,4 +104,5 @@
         const std::string                        name_;
         State                                    activity_;
+        const bool                               bCountTickTime_;
         GameState*                               parent_;
         std::map<std::string, GameState*>        children_;
Index: code/trunk/src/core/input/InputManager.cc
===================================================================
--- code/trunk/src/core/input/InputManager.cc	(revision 3068)
+++ code/trunk/src/core/input/InputManager.cc	(revision 3084)
@@ -41,4 +41,10 @@
 #include "ois/OISException.h"
 #include "ois/OISInputManager.h"
+#include "core/ConsoleCommand.h"
+
+// HACK
+#ifdef ORXONOX_PLATFORM_LINUX
+#  include "ois/linux/LinuxMouse.h"
+#endif
 
 #include "util/Exception.h"
@@ -47,5 +53,4 @@
 #include "core/ConfigValueIncludes.h"
 #include "core/CommandExecutor.h"
-#include "core/ConsoleCommand.h"
 #include "core/CommandLine.h"
 #include "util/Debug.h"
@@ -64,4 +69,8 @@
     SetConsoleCommand(InputManager, calibrate, true);
     SetConsoleCommand(InputManager, reload, false);
+#ifdef ORXONOX_PLATFORM_LINUX
+    SetConsoleCommand(InputManager, grabMouse, true);
+    SetConsoleCommand(InputManager, ungrabMouse, true);
+#endif
     SetCommandLineSwitch(keyboard_no_grab);
 
@@ -1469,3 +1478,25 @@
         getInstance().reloadInputSystem(joyStickSupport);
     }
+
+
+    // ############################################################
+    // #####                   ugly hacks                     #####
+    // ##########                                        ##########
+    // ############################################################
+
+#ifdef ORXONOX_PLATFORM_LINUX
+    void InputManager::grabMouse()
+    {
+        OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(singletonRef_s->mouse_);
+        assert(linuxMouse);
+        linuxMouse->grab(true);
+    }
+
+    void InputManager::ungrabMouse()
+    {
+        OIS::LinuxMouse* linuxMouse = dynamic_cast<OIS::LinuxMouse*>(singletonRef_s->mouse_);
+        assert(linuxMouse);
+        linuxMouse->grab(false);
+    }
+#endif
 }
Index: code/trunk/src/core/input/InputManager.h
===================================================================
--- code/trunk/src/core/input/InputManager.h	(revision 3068)
+++ code/trunk/src/core/input/InputManager.h	(revision 3084)
@@ -137,4 +137,10 @@
         bool requestEnterState     (const std::string& name);
         bool requestLeaveState     (const std::string& name);
+
+#ifdef ORXONOX_PLATFORM_LINUX
+        // HACK!
+        static void grabMouse();
+        static void ungrabMouse();
+#endif
 
         void update(const Clock& time);
