Index: /code/branches/network/src/network/Client.h
===================================================================
--- /code/branches/network/src/network/Client.h	(revision 917)
+++ /code/branches/network/src/network/Client.h	(revision 918)
@@ -16,7 +16,7 @@
 #include <string>
 
+#include "NetworkPrereqs.h"
+
 #include "core/Tickable.h"
-
-#include "NetworkPrereqs.h"
 #include "ClientConnection.h"
 #include "PacketManager.h"
Index: /code/branches/network/src/network/Server.cc
===================================================================
--- /code/branches/network/src/network/Server.cc	(revision 917)
+++ /code/branches/network/src/network/Server.cc	(revision 918)
@@ -13,5 +13,4 @@
 #include <iostream>
 
-#include "util/Sleep.h"
 #include "ConnectionManager.h"
 #include "PacketTypes.h"
@@ -19,4 +18,5 @@
 #include "ClientInformation.h"
 //#include "NetworkFrameListener.h"
+#include "util/Sleep.h"
 #include "Server.h"
 
Index: /code/branches/network/src/network/Server.h
===================================================================
--- /code/branches/network/src/network/Server.h	(revision 917)
+++ /code/branches/network/src/network/Server.h	(revision 918)
@@ -16,8 +16,8 @@
 #include <string>
 
+#include "NetworkPrereqs.h"
+
 #include "core/Tickable.h"
-
 #include "PacketManager.h"
-#include "NetworkPrereqs.h"
 
 
Index: /code/branches/network/src/orxonox/InputHandler.cc
===================================================================
--- /code/branches/network/src/orxonox/InputHandler.cc	(revision 918)
+++ /code/branches/network/src/orxonox/InputHandler.cc	(revision 918)
@@ -0,0 +1,145 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file
+ @brief Implementation of a little Input handler that distributes everything
+        coming from OIS.
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreRenderWindow.h>
+
+#include "InputHandler.h"
+
+namespace orxonox
+{
+  //using namespace OIS;
+
+  InputHandler::InputHandler()
+  {
+    RegisterObject(InputHandler);
+  }
+
+  void InputHandler::initialise(Ogre::RenderWindow *renderWindow)
+  {
+    if (!inputSystem_)
+    {
+      // Setup basic variables
+      OIS::ParamList paramList;
+      size_t windowHnd = 0;
+      std::ostringstream windowHndStr;
+
+      // Get window handle
+      renderWindow->getCustomAttribute("WINDOW", &windowHnd);
+
+      // Fill parameter list
+      windowHndStr << (unsigned int)windowHnd;
+      paramList.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
+
+      // Create inputsystem
+      inputSystem_ = OIS::InputManager::createInputSystem(paramList);
+
+      // If possible create a buffered keyboard
+      // (note: if below line doesn't compile, try:  if (inputSystem_->getNumberOfDevices(OIS::OISKeyboard) > 0) {
+      if (inputSystem_->numKeyboards() > 0)
+      {
+        //if (inputSystem_->getNumberOfDevices(OIS::OISKeyboard) > 0)
+        //{
+        keyboard_ = static_cast<OIS::Keyboard*>(inputSystem_->createInputObject(OIS::OISKeyboard, true));
+        keyboard_->setEventCallback(this);
+      }
+
+      // If possible create a buffered mouse
+      // (note: if below line doesn't compile, try:  if (inputSystem_->getNumberOfDevices(OIS::OISMouse) > 0) {
+      if (inputSystem_->numMice() > 0 )
+      {
+        //if (inputSystem_->getNumberOfDevices(OIS::OISMouse) > 0)
+        //{
+        mouse_ = static_cast<OIS::Mouse*>(inputSystem_->createInputObject(OIS::OISMouse, true));
+        mouse_->setEventCallback(this);
+
+        // Get window size
+        unsigned int width, height, depth;
+        int left, top;
+        renderWindow->getMetrics(width, height, depth, left, top);
+
+        // Set mouse region
+        this->setWindowExtents(width, height);
+      }
+    }
+  }
+
+  void InputHandler::tick(float dt)
+  {
+    // capture all the input. That calls the event handlers.
+    if (mouse_)
+    {
+      mouse_->capture();
+    }
+
+    if (keyboard_)
+    {
+      keyboard_->capture();
+    }
+  }
+
+  void InputHandler::setWindowExtents(int width, int height)
+  {
+    // Set mouse region (if window resizes, we should alter this to reflect as well)
+    const OIS::MouseState &mouseState = mouse_->getMouseState();
+    mouseState.width  = width;
+    mouseState.height = height;
+  }
+
+  bool InputHandler::keyPressed(const OIS::KeyEvent &e)
+  {
+    return true;
+  }
+
+  bool InputHandler::keyReleased(const OIS::KeyEvent &e)
+  {
+    return true;
+  }
+
+  bool InputHandler::mouseMoved(const OIS::MouseEvent &e)
+  {
+    return true;
+  }
+
+  bool InputHandler::mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id)
+  {
+    return true;
+  }
+
+  bool InputHandler::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id)
+  {
+    return true;
+  }
+
+}
Index: /code/branches/network/src/orxonox/InputHandler.h
===================================================================
--- /code/branches/network/src/orxonox/InputHandler.h	(revision 918)
+++ /code/branches/network/src/orxonox/InputHandler.h	(revision 918)
@@ -0,0 +1,73 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file
+ @brief Implementation of a little Input handler that distributes everything
+        coming from OIS.
+ */
+
+#ifndef _InputHandler_H__
+#define _InputHandler_H__
+
+#include <OIS/OISPrereqs.h>
+#include <OIS/OISMouse.h>
+#include <OIS/OISKeyboard.h>
+
+#include <OgrePrerequisites.h>
+
+#include "OrxonoxPrereqs.h"
+#include "core/Tickable.h"
+
+namespace orxonox
+{
+  class _OrxonoxExport InputHandler : public Tickable, public OIS::KeyListener,
+                                      public OIS::MouseListener
+  {
+  public:
+    InputHandler();
+
+    void initialise(Ogre::RenderWindow *renderWindow);
+    void tick(float dt);
+    void setWindowExtents(int width, int height);
+
+    // input events
+		bool mousePressed (const OIS::MouseEvent &arg, OIS::MouseButtonID id);
+		bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
+    bool mouseMoved   (const OIS::MouseEvent &arg);
+		bool keyPressed   (const OIS::KeyEvent   &arg);
+		bool keyReleased  (const OIS::KeyEvent   &arg);
+
+  private:
+    OIS::InputManager *inputSystem_;
+    OIS::Keyboard     *keyboard_;
+    OIS::Mouse        *mouse_;
+
+  };
+}
+
+#endif /* _InputHandler_H__ */
Index: /code/branches/network/src/orxonox/Main.cc
===================================================================
--- /code/branches/network/src/orxonox/Main.cc	(revision 917)
+++ /code/branches/network/src/orxonox/Main.cc	(revision 918)
@@ -76,5 +76,5 @@
 #define WIN32_LEAN_AND_MEAN
 #endif
-#include "windows.h"
+#include <windows.h>
   INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
   {
Index: /code/branches/network/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/network/src/orxonox/Orxonox.cc	(revision 917)
+++ /code/branches/network/src/orxonox/Orxonox.cc	(revision 918)
@@ -64,5 +64,4 @@
 #include "network/Server.h"
 #include "network/Client.h"
-#include "network/NetworkPrereqs.h"
 network::Client *client_g;
 network::Server *server_g;
@@ -79,5 +78,4 @@
 #include "hud/HUD.h"
 #include "objects/weapon/BulletManager.h"
-#include "GraphicsEngine.h"
 
 #include "Orxonox.h"
@@ -434,5 +432,5 @@
   /**
     Main loop of the orxonox game.
-    This is a new solution, using the ogre engine instead of beeing used by it.
+    This is a new solution, using the ogre engine instead of being used by it.
     An alternative solution would be to simply use the timer of the Root object,
     but that implies using Ogre in any case. There would be no way to test
Index: /code/branches/network/src/orxonox/Orxonox.h
===================================================================
--- /code/branches/network/src/orxonox/Orxonox.h	(revision 917)
+++ /code/branches/network/src/orxonox/Orxonox.h	(revision 918)
@@ -15,5 +15,4 @@
 
 #include "OrxonoxPrereqs.h"
-//#include "loader/LoaderPrereqs.h"
 #include "audio/AudioPrereqs.h"
 
Index: /code/branches/network/src/orxonox/OrxonoxStableHeaders.h
===================================================================
--- /code/branches/network/src/orxonox/OrxonoxStableHeaders.h	(revision 917)
+++ /code/branches/network/src/orxonox/OrxonoxStableHeaders.h	(revision 918)
@@ -41,26 +41,30 @@
 
 // not including the entire Ogre.h doesn't exceed the default heap size for pch
+#ifndef WIN32_LEAN_AND_MEAN
+// prevent Ogre from including winsock.h that messes with winsock2.h from enet
+#  define WIN32_LEAN_AND_MEAN
+#endif
 //#include <Ogre.h>
-#include <OgreBillboardSet.h>
-#include <OgreCamera.h>
-#include <OgreConfigFile.h>
+//#include <OgreBillboardSet.h>
+//#include <OgreCamera.h>
+//#include <OgreConfigFile.h>
 #include <OgreEntity.h>
 #include <OgreException.h>
-#include <OgreFrameListener.h>
+//#include <OgreFrameListener.h>
 #include <OgreLight.h>
-#include <OgreOverlay.h>
-#include <OgreOverlayElement.h>
-#include <OgreOverlayManager.h>
+//#include <OgreOverlay.h>
+//#include <OgreOverlayElement.h>
+//#include <OgreOverlayManager.h>
 #include <OgreParticleEmitter.h>
 #include <OgreParticleSystem.h>
 #include <OgrePlatform.h>
 #include <OgrePrerequisites.h>
-#include <OgreRenderWindow.h>
-#include <OgreRoot.h>
+//#include <OgreRenderWindow.h>
+//#include <OgreRoot.h>
 #include <OgreSceneManager.h>
 #include <OgreSceneNode.h>
 #include <OgreStringConverter.h>
-#include <OgreTextureManager.h>
-#include <OgreViewport.h>
+//#include <OgreTextureManager.h>
+//#include <OgreViewport.h>
 
 #include <OIS/OIS.h>
@@ -68,16 +72,13 @@
 /**
 * Some of the not so stable header files.
-* But it's not very useful to include them anyway..
+* It's not very useful to include them anyway..
 **/
-
-//#include "audio/AudioManager.h"
 
 #include "core/CoreIncludes.h"
 #include "core/BaseObject.h"
-//#include "core/ArgReader.h"
+#include "core/Tickable.h"
 #include "core/Error.h"
 #include "core/Loader.h"
 #include "core/XMLPort.h"
-#include "core/Tickable.h"
 
 #include "network/Synchronisable.h"
@@ -100,30 +101,6 @@
 #include "util/tinyxml/tinyxml.h"
 
-//#include "hud/HUD.h"
-//#include "loader/LevelLoader.h"
-//#include "objects/weapon/AmmunitionDump.h"
-//#include "objects/weapon/BarrelGun.h"
-//#include "objects/weapon/Bullet.h"
-//#include "objects/weapon/BulletManager.h"
-//#include "objects/weapon/WeaponStation.h"
-//#include "objects/Ambient.h"
-//#include "objects/Camera.h"
-//#include "objects/Explosion.h"
-//#include "objects/Fighter.h"
 #include "objects/Model.h"
-//#include "objects/NPC.h"
-//#include "objects/Projectile.h"
-//#include "objects/Skybox.h"
-//#include "objects/SpaceShipSteeringObject.h"
 #include "objects/WorldEntity.h"
-//#include "particle/ParticleInterface.h"
-//#include "tools/BillboardSet.h"
-//#include "tools/Light.h"
-//#include "tools/Mesh.h"
-//#include "tools/Timer.h"
-//#include "GraphicsEngine.h"
-//#include "InputManager.h"
-//#include "Orxonox.h"
-//#include "SpaceshipSteering.h"
 
 #endif
Index: /code/branches/network/src/orxonox/PrecompiledHeaderFiles.cc
===================================================================
--- /code/branches/network/src/orxonox/PrecompiledHeaderFiles.cc	(revision 917)
+++ /code/branches/network/src/orxonox/PrecompiledHeaderFiles.cc	(revision 918)
@@ -27,5 +27,5 @@
 
 /**
- @file  PrecompiledHeaderFiles.cc
+ @file
  @brief This file actually generates the precompiled header file
  */
Index: /code/branches/network/src/orxonox/core/BaseObject.cc
===================================================================
--- /code/branches/network/src/orxonox/core/BaseObject.cc	(revision 917)
+++ /code/branches/network/src/orxonox/core/BaseObject.cc	(revision 918)
@@ -27,5 +27,5 @@
 
 /**
-    @file BaseObject.cc
+    @file
     @brief Implementation of the BaseObject class.
 */
Index: /code/branches/network/src/orxonox/core/Tickable.cc
===================================================================
--- /code/branches/network/src/orxonox/core/Tickable.cc	(revision 917)
+++ /code/branches/network/src/orxonox/core/Tickable.cc	(revision 918)
@@ -26,6 +26,4 @@
  */
 
-#include "OrxonoxStableHeaders.h"
-
 #include "core/CoreIncludes.h"
 #include "Tickable.h"
Index: /code/branches/network/src/orxonox/core/Tickable.h
===================================================================
--- /code/branches/network/src/orxonox/core/Tickable.h	(revision 917)
+++ /code/branches/network/src/orxonox/core/Tickable.h	(revision 918)
@@ -41,5 +41,5 @@
 #define _Tickable_H__
 
-#include "../OrxonoxPrereqs.h"
+#include "CorePrereqs.h"
 #include "core/OrxonoxClass.h"
 
Index: /code/branches/network/visual_studio/network_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/network_properties.vsprops	(revision 917)
+++ /code/branches/network/visual_studio/network_properties.vsprops	(revision 918)
@@ -8,5 +8,5 @@
 	<Tool
 		Name="VCCLCompilerTool"
-		PreprocessorDefinitions="NETWORK_SHARED_BUILD; WIN32_LEAN_AND_MEAN; ZLIB_WINAPI "
+		PreprocessorDefinitions="NETWORK_SHARED_BUILD; ZLIB_WINAPI;WIN32_LEAN_AND_MEAN"
 	/>
 	<Tool
Index: /code/branches/network/visual_studio/vc8/orxonox.vcproj
===================================================================
--- /code/branches/network/visual_studio/vc8/orxonox.vcproj	(revision 917)
+++ /code/branches/network/visual_studio/vc8/orxonox.vcproj	(revision 918)
@@ -285,4 +285,8 @@
 			</File>
 			<File
+				RelativePath="..\..\src\orxonox\InputHandler.cc"
+				>
+			</File>
+			<File
 				RelativePath="..\..\src\orxonox\InputManager.cc"
 				>
@@ -655,4 +659,8 @@
 			</File>
 			<File
+				RelativePath="..\..\src\orxonox\InputHandler.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\src\orxonox\InputManager.h"
 				>
