Index: orxonox/trunk/src/story_entities/campaign.cc
===================================================================
--- orxonox/trunk/src/story_entities/campaign.cc	(revision 4322)
+++ orxonox/trunk/src/story_entities/campaign.cc	(revision 4324)
@@ -110,5 +110,4 @@
 ErrorMessage Campaign::start(int storyID = 0)
 {
-  printf("World::start() - starting new StoryEntity Nr:%i\n", storyID);
   ErrorMessage errorCode;
   if( !this->isInit) return errorCode; 
@@ -119,4 +118,5 @@
   while( se != NULL && this->running)
     {
+      PRINTF(0)("Starting new StoryEntity Nr:%i\n", se->getStoryID());
       se->displayLoadScreen();
       se->preLoad();
@@ -135,5 +135,5 @@
       if( ( nextWorldID == WORLD_ID_GAMEEND) ||( se == NULL) ) 
 	{
-	  printf("Campaign::start() - quitting campaing story loop\n");
+	  PRINTF(0)("Quitting campaing story loop\n");
 	  if(se != NULL)
 	    delete se;
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 4322)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 4324)
@@ -280,5 +280,5 @@
 
   this->localCamera = new Camera();
-  this->localCamera->setName ("camera");
+  this->localCamera->setName ("Camera");
   
   GraphicsEngine::getInstance()->displayFPS(true);
@@ -298,4 +298,5 @@
     {
       PRINTF(1)("World has no path specified for loading");
+      this->loadDebugWorld(this->getStoryID());
       return (ErrorMessage){213,"Path not specified","World::load()"};
     }
@@ -471,6 +472,8 @@
 
 
+
 void World::loadDebugWorld(int worldID)
 {
+  printf("ajsdflkajs;dlfaj;slfja;lsjf;lajsf;la;sdfkja;lskdjfashdfklajshdflkjasdfh\n");
   /*monitor progress*/
   this->glmis->step();
@@ -537,9 +540,4 @@
   lightMan->setAmbientColor(.1,.1,.1);
   lightMan->addLight();
-  //      lightMan->setAttenuation(1.0, .01, 0.0);
-  //      lightMan->setDiffuseColor(1,1,1);
-  //  lightMan->addLight(1);
-  //  lightMan->setPosition(20, 10, -20);
-  //  lightMan->setDiffuseColor(0,0,0);
   lightMan->debug();
 
@@ -556,9 +554,4 @@
 	lightMan->setPosition(-5.0, 10.0, -40.0);
 
-	// !\todo old track-system has to be removed
-
-	//create helper for player
-	//HelperParent* hp = new HelperParent ();
-	/* the player has to be added to this helper */
 
 	// create a player
@@ -581,111 +574,4 @@
 	this->glmis->step();
 
-	sky = new SkyBox();
-	//	(SkyBox*)(sky)->setTexture("pictures/sky/skybox", "jpg");
-	sky->setParent(localCamera);
-	this->spawn(sky);
-
-	/*monitor progress*/
-	this->glmis->step();
-
-	    
-	WorldEntity* env = new Environment();
-	env->setName ("env");
-	this->spawn(env);
-
-	   
-	/*
-	  Vector* es = new Vector (10, 5, 0);
-	  Quaternion* qs = new Quaternion ();
-	  WorldEntity* pr = new Primitive(P_CYLINDER);
-	  pr->setName("primitive");
-	  this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT);
-	*/
-
-	/*monitor progress*/
-	this->glmis->step();
-
-	//	    trackManager->setBindSlave(env);
-	PNode* tn = trackManager->getTrackNode();
-	tn->addChild(this->localPlayer);
-	this->localCamera->lookAt(tn);
-
-	//localCamera->setParent(TrackNode::getInstance());
-	tn->addChild(this->localCamera);
-	//	    localCamera->lookAt(tn);
-	this->localPlayer->setMode(PNODE_ALL);
-	//Vector* cameraOffset = new Vector (0, 5, -10);
-	trackManager->condition(2, LEFTRIGHT, this->localPlayer);
-	this->glmis->step();
-	break;
-      }
-    case DEBUG_WORLD_1:
-      {
-	lightMan->setPosition(.0, .0, .0);
-	lightMan->setAttenuation(1.0, .01, 0.0);
-	lightMan->setSpecularColor(1,0,0);
-	this->nullParent = NullParent::getInstance ();
-	this->nullParent->setName ("NullParent");
-
-	// create a player
-	WorldEntity* myPlayer = new Player();
-	myPlayer->setName ("player");
-	this->spawn(myPlayer);
-	this->localPlayer = myPlayer;	    
-	    
-	// bind input
-	Orxonox *orx = Orxonox::getInstance();
-	orx->getLocalInput()->bind (myPlayer);
-	    
-	// bind camera
-	this->localCamera = new Camera ();
-	this->localCamera->setName ("camera");
-	this->localCamera->lookAt(LightManager::getInstance()->getLight(0));
-	this->localCamera->setParent(this->localPlayer);
-
-	// Create SkySphere
-	sky = new Skysphere("pictures/sky-replace.jpg");
-	this->localPlayer->addChild(this->sky);
-	this->spawn(this->sky);
-	Vector* es = new Vector (20, 0, 0);
-	Quaternion* qs = new Quaternion ();
-
-	lightMan->getLight(0)->setParent(trackManager->getTrackNode());
-	break;
-      }
-    case DEBUG_WORLD_2:
-      {
-	lightMan->setAmbientColor(.1,.1,.1);
-	lightMan->addLight();
-	lightMan->setPosition(-5.0, 10.0, -40.0);
-	this->nullParent = NullParent::getInstance ();
-	this->nullParent->setName ("NullParent");
-
-	// !\todo old track-system has to be removed
-
-	//create helper for player
-	//HelperParent* hp = new HelperParent ();
-	/* the player has to be added to this helper */
-
-	// create a player
-	this->localPlayer = new Player ();
-	this->localPlayer->setName ("player");
-	this->spawn (this->localPlayer);
-	/*monitor progress*/
-	//this->glmis->step();	    
-	this->glmis->step();
-
-	// bind input
-	Orxonox *orx = Orxonox::getInstance ();
-	orx->getLocalInput()->bind (this->localPlayer);
-	    
-	// bind camera
-	this->localCamera = new Camera();
-	this->localCamera->setName ("camera");
-	this->localCamera->lookAt(this->localPlayer);
-	this->localCamera->setParent(this->localPlayer);
-	    
-	/*monitor progress*/
-	this->glmis->step();
 
 	// Create SkySphere
@@ -699,110 +585,33 @@
 
 
-	WorldEntity* baseNode = new Satellite(Vector(1,0,1), 1.2);
-	this->localPlayer->addChild(baseNode);
-	baseNode->setRelCoor(Vector(10.0, 2.0, 1.0));
-	this->spawn(baseNode);
-
-	WorldEntity* secondNode = new Satellite(Vector(0,0,1), 2.0);
-	baseNode->addChild(secondNode);
-	secondNode->setRelCoor(Vector(0.0, 0.0, 3.0));
-	this->spawn(secondNode);
-
-
-	WorldEntity* thirdNode = new Satellite(Vector(0,0,1), 1.0);
-	secondNode->addChild(thirdNode);
-	thirdNode->setRelCoor(Vector(2.0, 0.0, 0.0));
-	this->spawn(thirdNode);
-
-	    
-   
-	WorldEntity* c = new Environment();
-	this->localPlayer->addChild(c);
-	c->setRelCoor(Vector(10.0, 2.0, -1.0));
-	this->spawn(c);
-
-
-	    
-	Animation3D* animation = new Animation3D(c);
-	animation->setInfinity(ANIM_INF_REPLAY);
-
-
-	animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 
-	animation->addKeyFrame(Vector(0, 2, 0), Quaternion(M_PI, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 
-	animation->addKeyFrame(Vector(0, 0, 0), Quaternion(0, Vector(0,1,0)), 1.0, ANIM_NEG_EXP, ANIM_LINEAR); 
-
-
-
-
-
-
-	/*	   
-	  KeyFrame* f1 = new KeyFrame;
-	  f1->position = new Vector(-1.1, 0.0, 2.6);
-	  f1->direction = new Quaternion();
-	  f1->time = 1.0;
-	  f1->mode = NEG_EXP;
-		  
-		  
-	  KeyFrame* f2 = new KeyFrame;
-	  f2->position = new Vector(-2.1, 0.0, 2.6);
-	  f2->direction = new Quaternion();
-	  f2->time = 0.1;
-	  f2->mode = NEG_EXP;
-		  
-	  KeyFrame* f3 = new KeyFrame;
-	  f3->position = new Vector(10.0, 2.0, -1.0);
-	  f3->direction = new Quaternion();
-	  f3->time = 0.2;
-	  f3->mode = NEG_EXP;
-		  
-	  KeyFrame* f4 = new KeyFrame;
-	  f4->position = new Vector(10.0, 5.0, -1.0);
-	  f4->direction = new Quaternion();
-	  f4->time = 1.0;
-	  f4->mode = NEG_EXP;
-		  
-		  
-		  
-	  this->simpleAnimation->animatorBegin();
-	  this->simpleAnimation->selectObject(b);
-	  this->simpleAnimation->setAnimationMode(SINGLE);
-	  this->simpleAnimation->addKeyFrame(f1);
-	  this->simpleAnimation->addKeyFrame(f2);
-	  this->simpleAnimation->start();
-	  this->simpleAnimation->selectObject(c);
-	  this->simpleAnimation->addKeyFrame(f3);
-	  this->simpleAnimation->addKeyFrame(f4);
-	  this->simpleAnimation->start();
-	  this->simpleAnimation->animatorEnd();
-	*/
-
-	/*
-	  Vector* es = new Vector (10, 5, 0);
-	  Quaternion* qs = new Quaternion ();
-	  WorldEntity* pr = new Primitive(P_CYLINDER);
-	  pr->setName("primitive");
-	  this->spawn(pr, this->localPlayer, es, qs, PNODE_MOVEMENT);
-	*/
-
+	terrain = new Terrain("worlds/newGround.obj");
+	terrain->setRelCoor(Vector(0,-10,0));
+	this->spawn(terrain);
 	/*monitor progress*/
 	this->glmis->step();
 
-	//	    trackManager->setBindSlave(env);
 	PNode* tn = trackManager->getTrackNode();
 	tn->addChild(this->localPlayer);
-
-	//localCamera->setParent(TrackNode::getInstance());
+	this->localCamera->lookAt(tn);
+
+
 	tn->addChild(this->localCamera);
-	//	    localCamera->lookAt(tn);
 	this->localPlayer->setMode(PNODE_ALL);
-	//Vector* cameraOffset = new Vector (0, 5, -10);
 	trackManager->condition(2, LEFTRIGHT, this->localPlayer);
 	this->glmis->step();
+	break;
+      }
+    case DEBUG_WORLD_1:
+      {
+
+	break;
+      }
+    case DEBUG_WORLD_2:
+      {
 
 	break;
       }
     default:
-      printf("World::load() - no world with ID %i found", this->debugWorldNr );
+      break;
     }
 }
Index: orxonox/trunk/src/util/loading/game_loader.cc
===================================================================
--- orxonox/trunk/src/util/loading/game_loader.cc	(revision 4322)
+++ orxonox/trunk/src/util/loading/game_loader.cc	(revision 4324)
@@ -82,4 +82,7 @@
       delete campaignName;
     }
+  World* world0 = new World(DEBUG_WORLD_0);
+  world0->setNextStoryID(WORLD_ID_GAMEEND);
+  this->currentCampaign->addEntity(world0, WORLD_ID_2);
 }
 
Index: orxonox/trunk/src/util/object_manager.cc
===================================================================
--- orxonox/trunk/src/util/object_manager.cc	(revision 4322)
+++ orxonox/trunk/src/util/object_manager.cc	(revision 4324)
@@ -19,5 +19,4 @@
 #include "list.h"
 
-#include "projectile.h"
 
 using namespace std;
@@ -72,5 +71,5 @@
     this->managedObjectList[index]->add(object);
   else
-    PRINTF(0)(" Error: unable to add object to the list nr. %i: no list initialized - ignoring\n", index);
+    PRINTF(0)(" Critical: unable to add object to the list nr. %i: no list initialized - ignoring\n", index);
 }
 
@@ -82,8 +81,13 @@
       BaseObject* obj = this->managedObjectList[index]->firstElement();
       this->managedObjectList[index]->remove(obj);
+      if( unlikely(obj == NULL))
+	{
+	  PRINTF(0)("Critical: there was no object anymore in the dead list! This could result in Segfaults\n");
+	}
       return obj;
     }
   else
-    PRINTF(0)(" Error: unable to get object from the list nr. %i: no elements initialized - ignoring\n", index);
+    PRINTF(0)(" Critical: unable to get object from the list nr. %i: no elements initialized - ignoring\n", index);
+  return NULL;
 }
 
