Index: /code/branches/console/src/core/InputHandler.cc
===================================================================
--- /code/branches/console/src/core/InputHandler.cc	(revision 1135)
+++ /code/branches/console/src/core/InputHandler.cc	(revision 1136)
@@ -85,5 +85,5 @@
       InputHandlerGame::callListeners(e);
     }
-    else if (e.key == OIS::KC_NUMPADENTER)
+    else if (e.key == OIS::KC_UNASSIGNED || e.key == OIS::KC_NUMPADENTER)
     {
       InputManager::getSingleton().setInputMode(IM_KEYBOARD);
Index: /code/branches/console/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/console/src/orxonox/CMakeLists.txt	(revision 1135)
+++ /code/branches/console/src/orxonox/CMakeLists.txt	(revision 1136)
@@ -3,4 +3,5 @@
   Main.cc
   Orxonox.cc
+  console/InGameConsole.cc
 #  SpaceshipSteering.cc
   hud/HUD.cc
Index: /code/branches/console/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/console/src/orxonox/Orxonox.cc	(revision 1135)
+++ /code/branches/console/src/orxonox/Orxonox.cc	(revision 1136)
@@ -54,5 +54,4 @@
 //#include "util/Sleep.h"
 #include "util/ArgReader.h"
-#include "util/ExprParser.h"
 
 // core
@@ -76,4 +75,6 @@
 #include "tools/Timer.h"
 #include "hud/HUD.h"
+#include "console/InGameConsole.h"
+//#include "objects/weapon/BulletManager.h"
 
 // FIXME: is this really file scope?
@@ -125,26 +126,4 @@
   };
 
-  class Calculator
-  {
-  public:
-    static void calculate(const std::string& calculation)
-    {
-      ExprParser expr(calculation);
-      if (expr.getSuccess())
-      {
-        if (expr.getResult() == 42.0)
-          std::cout << "Greetings from the restaurant at the end of the universe." << std::endl;
-        // FIXME: insert modifier to display in full precision
-        std::cout << "Result is: " << expr.getResult() << std::endl;
-        if (expr.getRemains() != "")
-          std::cout << "Warning: Expression could not be parsed to the end! Remains: '"
-              << expr.getRemains() << "'" << std::endl;
-      }
-      else
-        std::cout << "Cannot calculate expression: Parse error" << std::endl;
-    }
-  };
-  ConsoleCommandShortcut(Calculator, calculate, AccessLevel::None);
-
   /**
     @brief Reference to the only instance of the class.
@@ -162,4 +141,5 @@
     this->auMan_ = 0;
     this->inputHandler_ = 0;
+    //this->root_ = 0;
     // turn on frame smoothing by setting a value different from 0
     this->frameSmoothingTime_ = 0.0f;
@@ -174,4 +154,6 @@
   {
     // keep in mind: the order of deletion is very important!
+//    if (this->bulletMgr_)
+//      delete this->bulletMgr_;
     if (this->orxonoxHUD_)
       delete this->orxonoxHUD_;
@@ -191,10 +173,9 @@
 
   /**
-    @brief Immediately deletes the orxonox object.
-    Never use if you can help it while rendering!
-  */
-  void Orxonox::abortImmediateForce()
-  {
-    COUT(1) << "*** Orxonox Error: Orxonox object was unexpectedly destroyed." << std::endl;
+   * error kills orxonox
+   */
+  void Orxonox::abortImmediate(/* some error code */)
+  {
+    //TODO: destroy and destruct everything and print nice error msg
     delete this;
   }
@@ -205,5 +186,4 @@
   void Orxonox::abortRequest()
   {
-    COUT(3) << "*** Orxonox: Abort requested." << std::endl;
     bAbort_ = true;
   }
@@ -246,5 +226,5 @@
     ar.checkArgument("data", this->dataPath_, false);
     ar.checkArgument("ip", serverIp_, false);
-    if(ar.errorHandling()) abortImmediateForce();
+    if(ar.errorHandling()) abortImmediate();
     if(mode == std::string("client"))
     {
@@ -269,5 +249,5 @@
     ogre_->setup();
     //root_ = ogre_->getRoot();
-    if(!ogre_->load(this->dataPath_)) abortImmediateForce(/* unable to load */);
+    if(!ogre_->load(this->dataPath_)) abortImmediate(/* unable to load */);
 
     server_g = new network::Server();
@@ -284,5 +264,5 @@
     else
       client_g = new network::Client(serverIp_, NETWORK_PORT);
-    if(!ogre_->load(this->dataPath_)) abortImmediateForce(/* unable to load */);
+    if(!ogre_->load(this->dataPath_)) abortImmediate(/* unable to load */);
   }
 
@@ -293,5 +273,6 @@
     ogre_->setConfigPath(path);
     ogre_->setup();
-    if(!ogre_->load(this->dataPath_)) abortImmediateForce(/* unable to load */);
+    //root_ = ogre_->getRoot();
+    if(!ogre_->load(this->dataPath_)) abortImmediate(/* unable to load */);
   }
 
@@ -321,4 +302,6 @@
     auMan_ = new audio::AudioManager();
 
+    //bulletMgr_ = new BulletManager();
+
     Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
     HUD* orxonoxHud;
@@ -368,4 +351,6 @@
     auMan_ = new audio::AudioManager();
 
+    //bulletMgr_ = new BulletManager();
+
     // load this file from config
     Level* startlevel = new Level("levels/sample.oxw");
@@ -396,5 +381,5 @@
     if (!inputHandler_->initialise(ogre_->getWindowHandle(),
           ogre_->getWindowWidth(), ogre_->getWindowHeight()))
-      abortImmediateForce();
+      abortImmediate();
     inputHandler_->setInputMode(IM_INGAME);
   }
@@ -418,4 +403,5 @@
     InputBuffer* ib = new InputBuffer();
     InputManager::getSingleton().feedInputBuffer(ib);
+    /*
     Testconsole* console = new Testconsole(ib);
     ib->registerListener(console, &Testconsole::listen, true);
@@ -426,13 +412,21 @@
     ib->registerListener(console, &Testconsole::removeLast, '\b', true);
     ib->registerListener(console, &Testconsole::exit, (char)0x1B, true);
+    */
+
+    orxonoxConsole_ = new InGameConsole(ib);
+    ib->registerListener(orxonoxConsole_, &InGameConsole::listen, true);
+    ib->registerListener(orxonoxConsole_, &InGameConsole::execute, '\r', false);
+    ib->registerListener(orxonoxConsole_, &InGameConsole::execute, '\n', false);
+    ib->registerListener(orxonoxConsole_, &InGameConsole::hintandcomplete, '\t', true);
+    ib->registerListener(orxonoxConsole_, &InGameConsole::clear, '§', true);
+    ib->registerListener(orxonoxConsole_, &InGameConsole::removeLast, '\b', true);
+    ib->registerListener(orxonoxConsole_, &InGameConsole::exit, (char)0x1B, true);
 
     // first check whether ogre root object has been created
     if (Ogre::Root::getSingletonPtr() == 0)
     {
-      COUT(2) << "*** Orxonox Error: Could not start rendering. No Ogre root object found" << std::endl;
+      COUT(2) << "Error: Could not start rendering. No Ogre root object found" << std::endl;
       return;
     }
-    Ogre::Root& ogreRoot = Ogre::Root::getSingleton();
-
 
     // Contains the times of recently fired events
@@ -454,5 +448,4 @@
 	  {
 		  // Pump messages in all registered RenderWindows
-      // This calls the WindowEventListener objects.
       Ogre::WindowEventUtilities::messagePump();
 
@@ -473,14 +466,17 @@
 
       // Iterate through all Tickables and call their tick(dt) function
-      for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
-        it->tick((float)evt.timeSinceLastFrame * this->timefactor_);
+      for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; )
+      {
+        (it)->tick((float)evt.timeSinceLastFrame * this->timefactor_);
+        it++;
+      }
 
       // don't forget to call _fireFrameStarted in ogre to make sure
       // everything goes smoothly
-      ogreRoot._fireFrameStarted(evt);
+      Ogre::Root::getSingleton()._fireFrameStarted(evt);
 
       // server still renders at the moment
       //if (mode_ != SERVER)
-      ogreRoot._updateAllRenderTargets(); // only render in non-server mode
+      Ogre::Root::getSingleton()._updateAllRenderTargets(); // only render in non-server mode
 
       // get current time
@@ -492,5 +488,5 @@
 
       // again, just to be sure ogre works fine
-      ogreRoot._fireFrameEnded(evt);
+      Ogre::Root::getSingleton()._fireFrameEnded(evt);
 	  }
   }
Index: /code/branches/console/src/orxonox/Orxonox.h
===================================================================
--- /code/branches/console/src/orxonox/Orxonox.h	(revision 1135)
+++ /code/branches/console/src/orxonox/Orxonox.h	(revision 1136)
@@ -61,5 +61,6 @@
       void init(int argc, char **argv, std::string path);
       void start();
-      void abortImmediateForce();
+      // not sure if this should be private
+      void abortImmediate(/* some error code */);
       void abortRequest();
       inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
@@ -106,4 +107,5 @@
       float                 frameSmoothingTime_;
       HUD*                  orxonoxHUD_;
+      InGameConsole*        orxonoxConsole_;
       bool                  bAbort_;        //!< aborts the render loop if true
       float                 timefactor_;    //!< A factor to change the gamespeed
Index: /code/branches/console/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- /code/branches/console/src/orxonox/OrxonoxPrereqs.h	(revision 1135)
+++ /code/branches/console/src/orxonox/OrxonoxPrereqs.h	(revision 1136)
@@ -96,4 +96,6 @@
   // hud
   class HUD;
+  //console
+  class InGameConsole;
 }
 
