Index: /orxonox/trunk/src/campaign.cc
===================================================================
--- /orxonox/trunk/src/campaign.cc	(revision 3219)
+++ /orxonox/trunk/src/campaign.cc	(revision 3220)
@@ -48,5 +48,5 @@
     want to queue up in the campaign.
 */
-void Campaign::addEntity(StoryEntity* se, Uint32 storyID)
+void Campaign::addEntity(StoryEntity* se, int storyID)
 {
   se->setStoryID(storyID);
@@ -60,5 +60,5 @@
 
 
-void Campaign::removeEntity(Uint32 storyID)
+void Campaign::removeEntity(int storyID)
 {
   this->removeEntity(this->getStoryEntity(storyID));
@@ -78,5 +78,5 @@
 }
 
-Error Campaign::start(Uint32 storyID = 0)
+Error Campaign::start(int storyID = 0)
 {
   printf("World::start() - starting new StoryEntity Nr:%i\n", storyID);
@@ -86,20 +86,30 @@
   this->running = true;
   StoryEntity* se = this->getStoryEntity(storyID);
+  this->currentEntity = se;
   while(se != NULL && this->running)
     {
-      se = this->getStoryEntity(storyID);
-      this->currentEntity = se;
+      //se = this->getStoryEntity(storyID);
       
-      se->displayEntityScreen();
+      
+      se->displayLoadScreen();
       se->load();
       se->init();
-      se->releaseEntityScreen();
+      se->releaseLoadScreen();
       se->start();
 
+      delete se;
+
       int nextWorldID = se->getNextStoryID();
-      if(nextWorldID == WORLD_ID_GAMEEND) return errorCode;
+      //printf("Campaing::start() - got nextWorldID = %i\n", nextWorldID);
       se = this->getStoryEntity(nextWorldID);
-      if(se == NULL)
-	printf("Campaign::start() - ERROR: world not found, oh oh...\n");
+      this->currentEntity = se;
+      if( ( nextWorldID == WORLD_ID_GAMEEND) ||( se == NULL) ) 
+	{
+	  printf("Campaign::start() - quiting campaing story loop\n");
+	  if(se != NULL)
+	    delete se;
+	  return errorCode;
+	}
+      
     }
 }
@@ -111,6 +121,6 @@
     {
       this->currentEntity->stop();
-      delete this->currentEntity;
-      this->currentEntity = NULL;
+      //delete this->currentEntity;
+      //this->currentEntity = NULL;
     }
 }
@@ -130,10 +140,21 @@
 
 
+void Campaign::destroy()
+{
+  if(this->currentEntity != NULL)
+    {
+      this->currentEntity->destroy();
+      delete this->currentEntity;
+      this->currentEntity = NULL;
+    }
+}
+
 void Campaign::nextLevel()
 {
-  printf("Campaign|nextLevel\n");
-  int nextID = this->currentEntity->getNextStoryID();
-  this->stop();
-  this->start(nextID);
+  printf("Campaign:nextLevel()\n");
+  //int nextID = this->currentEntity->getNextStoryID();
+  //this->stop();
+  //this->start(nextID);
+  this->currentEntity->stop();
 }
 
@@ -142,8 +163,11 @@
 
 
-StoryEntity* Campaign::getStoryEntity(Uint32 storyID)
+StoryEntity* Campaign::getStoryEntity(int storyID)
 {
+  //printf("Campaing::getStoryEntity(%i) - getting next Entity\n", storyID);
+  if( storyID == WORLD_ID_GAMEEND)
+    return NULL;
   ListTemplate<StoryEntity>* l;
-  StoryEntity* entity;
+  StoryEntity* entity = NULL;
   l = this->entities->get_next();  
   while( l != NULL) 
@@ -151,6 +175,11 @@
       entity = l->get_object();
       l = l->get_next();
-      if(entity->getStoryID() == storyID)
-	return entity;
+      int id = entity->getStoryID();
+      //printf("Campaing::getStoryEntity() - now looping, found entity nr=%i\n", id);
+      if(id == storyID)
+	{
+	  //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
+	  return entity;
+	}
     }
   return NULL;
Index: /orxonox/trunk/src/campaign.h
===================================================================
--- /orxonox/trunk/src/campaign.h	(revision 3219)
+++ /orxonox/trunk/src/campaign.h	(revision 3220)
@@ -19,12 +19,14 @@
   virtual Error init();
   virtual Error start();
-  virtual Error start(Uint32 storyID);
+  virtual Error start(int storyID);
   virtual Error stop();
   virtual Error pause();
   virtual Error resume();
 
-  void addEntity(StoryEntity* se, Uint32 storyID);
+  virtual void destroy();
+
+  void addEntity(StoryEntity* se, int storyID);
   void addEntity(StoryEntity* se);
-  void removeEntity(Uint32 storyID);
+  void removeEntity(int storyID);
   void removeEntity(StoryEntity* se);
   
@@ -36,5 +38,5 @@
   bool running;
 
-  StoryEntity* getStoryEntity(Uint32 storyID);
+  StoryEntity* getStoryEntity(int storyID);
 };
 
Index: /orxonox/trunk/src/game_loader.cc
===================================================================
--- /orxonox/trunk/src/game_loader.cc	(revision 3219)
+++ /orxonox/trunk/src/game_loader.cc	(revision 3220)
@@ -72,7 +72,9 @@
       {
 	Campaign* debugCampaign = new Campaign();
+
 	World* world0 = new World(DEBUG_WORLD_0);
-	world0->setNextStoryID(DEBUG_WORLD_1);
+	world0->setNextStoryID(WORLD_ID_1);
 	debugCampaign->addEntity(world0, WORLD_ID_0);
+
 	World* world1 = new World(DEBUG_WORLD_1);
 	world1->setNextStoryID(WORLD_ID_GAMEEND);
@@ -162,4 +164,9 @@
       return true;
     }
+  else if( !strcmp( cmd->cmd, "quit"))
+    {
+      if( !cmd->bUp) this->stop();
+      return true;
+    }
   return false;
 }
Index: /orxonox/trunk/src/orxonox.cc
===================================================================
--- /orxonox/trunk/src/orxonox.cc	(revision 3219)
+++ /orxonox/trunk/src/orxonox.cc	(revision 3220)
@@ -269,5 +269,5 @@
 bool Orxonox::system_command (Command* cmd)
 {
-  
+  /*
   if( !strcmp( cmd->cmd, "quit"))
     {
@@ -276,5 +276,6 @@
     }
   return false;
-  
+  */
+  return false;
 }
 
Index: /orxonox/trunk/src/story_def.h
===================================================================
--- /orxonox/trunk/src/story_def.h	(revision 3219)
+++ /orxonox/trunk/src/story_def.h	(revision 3220)
@@ -4,11 +4,11 @@
 
 
-#define DEBUG_CAMPAIGN_0 0
-#define DEBUG_CAMPAIGN_1 1
-#define DEBUG_CAMPAIGN_2 2
+#define DEBUG_CAMPAIGN_0 1000
+#define DEBUG_CAMPAIGN_1 1001
+#define DEBUG_CAMPAIGN_2 1002
 
-#define DEBUG_WORLD_0 0
-#define DEBUG_WORLD_1 1
-#define DEBUG_WORLD_2 2
+#define DEBUG_WORLD_0 100
+#define DEBUG_WORLD_1 101
+#define DEBUG_WORLD_2 102
 
 #define WORLD_ID_0 0
@@ -20,5 +20,5 @@
 #define WORLD_ID_GAMEEND 999
 
-#define MAX_STORY_ENTITIES 99; //!> maximal StoryEntities in a Campaign
+#define MAX_STORY_ENTITIES 99 //!> maximal StoryEntities in a Campaign
 
 #endif
Index: /orxonox/trunk/src/story_entity.cc
===================================================================
--- /orxonox/trunk/src/story_entity.cc	(revision 3219)
+++ /orxonox/trunk/src/story_entity.cc	(revision 3220)
@@ -39,5 +39,5 @@
 
 
-void StoryEntity::setStoryID(Uint32 storyID)
+void StoryEntity::setStoryID(int storyID)
 {
   this->storyID = storyID;
@@ -50,10 +50,10 @@
 
 
-void StoryEntity::setNextStoryID(Uint32 nextStoryID)
+void StoryEntity::setNextStoryID(int nextStoryID)
 {
   this->nextStoryID = nextStoryID;
 }
 
-Uint32 StoryEntity::getNextStoryID()
+int StoryEntity::getNextStoryID()
 {
   return this->nextStoryID;
@@ -61,5 +61,5 @@
 
 
-Error StoryEntity::start(Uint32 storyID)
+Error StoryEntity::start(int storyID)
 {}
 
@@ -80,8 +80,11 @@
 {}
 
-
-void StoryEntity::displayEntityScreen()
+void StoryEntity::destroy()
 {}
 
-void StoryEntity::releaseEntityScreen()
+
+void StoryEntity::displayLoadScreen()
 {}
+
+void StoryEntity::releaseLoadScreen()
+{}
Index: /orxonox/trunk/src/story_entity.h
===================================================================
--- /orxonox/trunk/src/story_entity.h	(revision 3219)
+++ /orxonox/trunk/src/story_entity.h	(revision 3220)
@@ -16,5 +16,5 @@
 
   virtual Error init();
-  virtual Error start(Uint32 storyID);
+  virtual Error start(int storyID);
   virtual Error start();
   virtual Error stop();
@@ -23,18 +23,19 @@
 
   virtual void load();
+  virtual void destroy();
 
-  virtual void displayEntityScreen();
-  virtual void releaseEntityScreen();
+  virtual void displayLoadScreen();
+  virtual void releaseLoadScreen();
 
-  void setStoryID(Uint32 storyID);
+  void setStoryID(int storyID);
   int getStoryID();
 
-  void setNextStoryID(Uint32 nextStoryID);
-  Uint32 getNextStoryID();
+  void setNextStoryID(int nextStoryID);
+  int getNextStoryID();
 
 
  private:
-  Uint32 storyID;
-  Uint32 nextStoryID;
+  int storyID;
+  int nextStoryID;
 };
 
Index: /orxonox/trunk/src/world.cc
===================================================================
--- /orxonox/trunk/src/world.cc	(revision 3219)
+++ /orxonox/trunk/src/world.cc	(revision 3220)
@@ -51,32 +51,8 @@
 World::~World ()
 {
-  Orxonox *orx = Orxonox::getInstance();
-  orx->get_localinput()->unbind (this->localPlayer);
-  delete this->entities;
-  delete this->localCamera;
-}
-
-
-/** 
-    \brief initialize the world before use.
-*/
-Error World::init()
-{
-  this->bPause = false;
+  printf("World::~World() - deleting current world\n");
   CommandNode* cn = Orxonox::getInstance()->get_localinput();
-  cn->addToWorld(this);
-  cn->enable(true);
-}
-
-Error World::start()
-{
-  this->mainLoop();
-}
-
-Error World::stop()
-{
-  this->bQuitCurrentGame = true;
-  //this->localCamera->setWorld(NULL);
-  this->localPlayer->destroy();
+  cn->unbind(this->localPlayer);
+  cn->reset();
   this->localCamera->destroy();
 
@@ -88,5 +64,35 @@
     }
   this->entities->destroy();
-  Orxonox::getInstance()->get_localinput()->reset();
+
+  delete this->entities;
+  delete this->localCamera;
+  /* this->localPlayer hasn't to be deleted explicitly, it is 
+     contained in entities*/
+}
+
+
+/** 
+    \brief initialize the world before use.
+*/
+Error World::init()
+{
+  this->bPause = false;
+  CommandNode* cn = Orxonox::getInstance()->get_localinput();
+  cn->addToWorld(this);
+  cn->enable(true);
+}
+
+Error World::start()
+{
+  printf("World::start() - starting current World: nr %i\n", this->debugWorldNr);
+  this->bQuitOrxonox = false;
+  this->bQuitCurrentGame = false;
+  this->mainLoop();
+}
+
+Error World::stop()
+{
+  printf("World::stop() - got stop signal\n");
+  this->bQuitCurrentGame = true;
 }
 
@@ -568,7 +574,5 @@
 {
   this->lastFrame = SDL_GetTicks();
-  this->bQuitOrxonox = false;
-  this->bQuitCurrentGame = false;
-  printf("World|Entering main loop\n");
+  printf("World::mainLoop() - Entering main loop\n");
   while( !this->bQuitOrxonox && !this->bQuitCurrentGame) /* \todo implement pause */
     {
@@ -740,9 +744,4 @@
 bool World::command(Command* cmd)
 {
-  if( !strcmp( cmd->cmd, "quit"))
-    {
-      if( !cmd->bUp) this->stop();
-      return true;
-    }
   return false;
 }
