Index: /orxonox/trunk/src/command_node.cc
===================================================================
--- /orxonox/trunk/src/command_node.cc	(revision 3215)
+++ /orxonox/trunk/src/command_node.cc	(revision 3216)
@@ -20,4 +20,5 @@
 #include "world_entity.h"
 #include "game_loader.h"
+#include "world.h"
 
 #include <stdio.h>
@@ -38,4 +39,5 @@
   this->bLocalInput = false;
   this->bEnabled = true;
+  this->world = NULL;
 }
 
@@ -51,4 +53,5 @@
   this->bound = new tList<WorldEntity>();
   this->bEnabled = true;
+  this->world = NULL;
   this->load_bindings (filename);
 }
@@ -78,4 +81,5 @@
   //this->bound = NULL; /* \todo this produces a NULLpointer error.. FIX */
   this->bEnabled = false;
+  this->world = NULL;
 }
 
@@ -84,4 +88,19 @@
   this->bEnabled = bEnabled;
 }
+
+
+/**
+  \brief adds Node to a GameWorld
+
+   this is usefull, if you want to catch events in a world class. usualy
+   this is done automaticaly via GameLoader. Reset it via 
+   CommandNode::reset()
+
+*/
+void CommandNode::addToWorld(World* world)
+{
+  this->world = world;
+}
+
 
 /**
@@ -251,11 +270,14 @@
   Orxonox *orx = Orxonox::getInstance();
   if( orx->system_command (cmd)) return;
+
   GameLoader* gl = GameLoader::getInstance();
-  if(gl->worldCommand(cmd)) return;
-  
+  if( gl->worldCommand(cmd)) return;
+
   if( bLocalInput) send_over_network (cmd);
   
+  if( this->world->command(cmd)) return;
+
   WorldEntity* entity = bound->enumerate();
-  while(  entity != NULL)
+  while( entity != NULL)
     {
       entity->command (cmd);
Index: /orxonox/trunk/src/command_node.h
===================================================================
--- /orxonox/trunk/src/command_node.h	(revision 3215)
+++ /orxonox/trunk/src/command_node.h	(revision 3216)
@@ -12,4 +12,5 @@
 
 class WorldEntity;
+class World;
 
 #define N_STD_KEYS SDLK_LAST
@@ -44,4 +45,5 @@
   tList<WorldEntity>* bound;	//!< List of WorldEntites that recieve commands from this CommandNode
   Sint32 coord[2];
+  World* world;
   
 
@@ -62,4 +64,5 @@
   void bind (WorldEntity* entity);
   void unbind (WorldEntity* entity);
+  void addToWorld(World* world);
   void process ();
   
Index: /orxonox/trunk/src/orxonox.cc
===================================================================
--- /orxonox/trunk/src/orxonox.cc	(revision 3215)
+++ /orxonox/trunk/src/orxonox.cc	(revision 3216)
@@ -269,4 +269,5 @@
 bool Orxonox::system_command (Command* cmd)
 {
+  
   if( !strcmp( cmd->cmd, "quit"))
     {
@@ -275,4 +276,5 @@
     }
   return false;
+  
 }
 
Index: /orxonox/trunk/src/world.cc
===================================================================
--- /orxonox/trunk/src/world.cc	(revision 3215)
+++ /orxonox/trunk/src/world.cc	(revision 3216)
@@ -64,5 +64,7 @@
 {
   this->bPause = false;
-  Orxonox::getInstance()->get_localinput()->enable(true);
+  CommandNode* cn = Orxonox::getInstance()->get_localinput();
+  cn->addToWorld(this);
+  cn->enable(true);
 }
 
@@ -78,5 +80,4 @@
   this->localPlayer->destroy();
   this->localCamera->destroy();
-
 
   WorldEntity* entity = entities->enumerate();  
@@ -610,5 +611,6 @@
 {
   // localinput
-  Orxonox::getInstance()->get_localinput()->process();
+  CommandNode* cn = Orxonox::getInstance()->get_localinput();
+  cn->process();
   // remoteinput
 }
@@ -643,4 +645,5 @@
 }
 
+
 /**
    \brief compute collision detection
@@ -651,21 +654,4 @@
 }
 
-/**
-   \brief handle keyboard commands that are not meant for WorldEntities
-   \param cmd: the command to handle
-   \return true if the command was handled by the system or false if it may be passed to the WorldEntities
-*/
-bool World::system_command (Command* cmd)
-{
-  if( !strcmp( cmd->cmd, "quit"))
-    {
-      if( !cmd->bUp) this->bQuitOrxonox = true;
-      {
-	printf("World::system_command() - rescv quit command\n");
-	return true;
-      }
-    }
-  return false;
-}
 
 /**
@@ -750,2 +736,13 @@
   //return entity;
 }
+
+
+bool World::command(Command* cmd)
+{
+  if( !strcmp( cmd->cmd, "quit"))
+    {
+      if( !cmd->bUp) this->stop();
+      return true;
+    }
+  return false;
+}
Index: /orxonox/trunk/src/world.h
===================================================================
--- /orxonox/trunk/src/world.h	(revision 3215)
+++ /orxonox/trunk/src/world.h	(revision 3216)
@@ -44,8 +44,9 @@
 	
   void unload ();
+  bool command(Command* cmd);
   
   void setTrackLen(Uint32 tracklen);
   int getTrackLen();
-  bool system_command (Command* cmd);
+  //bool system_command (Command* cmd);
   Camera* getCamera();
 
