Index: orxonox/branches/levelloader/src/story_entities/world.cc
===================================================================
--- orxonox/branches/levelloader/src/story_entities/world.cc	(revision 3605)
+++ orxonox/branches/levelloader/src/story_entities/world.cc	(revision 3606)
@@ -114,7 +114,7 @@
   delete this->lightMan;
   delete this->trackManager;
-}
   if( this->worldName) delete this->worldName;
   if( this->path) delete this->path;
+}
 
 /**
@@ -139,7 +139,5 @@
 */
 ErrorMessage World::load()
-{
-<<<<<<< .working
-	
+{	
 	PRINTF0("> Loading world: '%s'\n", getPath());
 	
@@ -155,88 +153,6 @@
 	// load the campaign document
 	if( !XMLDoc->LoadFile())
-=======
-  //  BezierCurve* tmpCurve = new BezierCurve();
-  if(this->debugWorldNr != -1)
-    {
-      // initializing Font
-      testFont = new FontSet();
-      testFont->buildFont("../data/pictures/font.tga");
-
-      // initializing the TrackManager
-      trackManager = TrackManager::getInstance();
-      trackManager->addPoint(Vector(0,0,0));
-      trackManager->addPoint(Vector(100, -40, 5));
-      trackManager->addPoint(Vector(200,-40,-8));
-      trackManager->addPoint(Vector(250, -35, -2));
-      trackManager->addPoint(Vector(320,-33,-.55));
-      trackManager->setDuration(1);
-      trackManager->setSavePoint();
-      trackManager->addPoint(Vector(410, 0, 0));
-      trackManager->addPoint(Vector(510, 20, -10));
-      trackManager->addPoint(Vector(550, 20, -10));
-      trackManager->addPoint(Vector(570, 20, -10));
-      trackManager->setDuration(1);
-      
-      int fork11, fork12;
-      trackManager->fork(2, &fork11, &fork12);
-      trackManager->workOn(fork11);
-      trackManager->addPoint(Vector(640, 25, -30));
-      trackManager->addPoint(Vector(700, 40, -120));
-      trackManager->addPoint(Vector(800, 50, -150));
-      trackManager->addPoint(Vector(900, 60, -100));
-      trackManager->addPoint(Vector(900, 60, -70));
-      trackManager->addPoint(Vector(990, 65, -15));
-      trackManager->addPoint(Vector(1050, 65, -10));
-      trackManager->addPoint(Vector(1100, 65, -20));
-      trackManager->setDuration(4);
-
-      trackManager->workOn(fork12);
-      trackManager->addPoint(Vector(640, 25, 20));
-      trackManager->addPoint(Vector(670, 50, 120));
-      trackManager->addPoint(Vector(700, 70, 80));
-      trackManager->addPoint(Vector(800, 70, 65));
-      trackManager->addPoint(Vector(850, 65, 65));
-      trackManager->addPoint(Vector(920, 35, 40));
-      trackManager->addPoint(Vector(945, 40, 40));
-      trackManager->addPoint(Vector(970, 24, 40));
-      trackManager->addPoint(Vector(1000, 40, -7));
-      trackManager->setDuration(4);
-      
-
-      trackManager->join(2, fork11, fork12);
-
-      trackManager->workOn(5);
-      trackManager->addPoint(Vector(1200, 60, -50));
-      trackManager->addPoint(Vector(1300, 50, -50));
-      trackManager->addPoint(Vector(1400, 40, -50));
-      trackManager->addPoint(Vector(1500, 40, -60));
-      trackManager->addPoint(Vector(1600, 35, -55));
-      trackManager->addPoint(Vector(1700, 45, -40));
-      trackManager->addPoint(Vector(1750, 60, -40));
-      trackManager->addPoint(Vector(1770, 80, -40));
-      trackManager->addPoint(Vector(1800, 100, -40));
-      trackManager->setDuration(4);
-
-      trackManager->finalize();
-
-      
-      /*monitor progress*/
-      this->glmis->step();
-
-      // LIGHT initialisation
-      lightMan = LightManager::getInstance();
-      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();
-
-      switch(this->debugWorldNr)
->>>>>>> .merge-right.r3604
-	{
-<<<<<<< .working
+
+	{
 		// report an error
 		PRINTF0("Error loading XML File: %s @ %d:%d\n", XMLDoc->ErrorDesc(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
@@ -316,18 +232,4 @@
 		PRINTF0("Done loading Track\n");
 	}
-=======
-	  /*
-	    this loads the hard-coded debug world. this only for simplicity and will be 
-	    removed by a reald world-loader, which interprets a world-file.
-	    if you want to add an own debug world, just add a case DEBUG_WORLD_[nr] and
-	    make whatever you want...
-	   */
-	case DEBUG_WORLD_0:
-	  {
-	    lightMan->setPosition(-5.0, 10.0, -40.0);
-	    this->nullParent = NullParent::getInstance ();
-	    this->nullParent->setName ("NullParent");
->>>>>>> .merge-right.r3604
-
 	
 	// free the XML data
@@ -360,5 +262,4 @@
     this->localPlayer->addChild (this->localCamera);
 
-<<<<<<< .working
 	
 	// stuff beyond this point remains to be loaded properly
@@ -366,31 +267,5 @@
       /*monitor progress*/
   //  this->glmis->step();
-=======
-	    //create helper for player
-	    //HelperParent* hp = new HelperParent ();
-	    /* the player has to be added to this helper */
->>>>>>> .merge-right.r3604
-
-<<<<<<< .working
-=======
-	    // create a player
-	    this->localPlayer = new Player ();
-	    this->localPlayer->setName ("player");
-	    this->spawn (this->localPlayer);
-	    /*monitor progress*/
-	    this->glmis->step();	    
-
-	    // bind input
-	    Orxonox *orx = Orxonox::getInstance ();
-	    orx->getLocalInput()->bind (this->localPlayer);
-	    
-	    // bind camera
-	    this->localCamera = new Camera(this);
-	    this->localCamera->setName ("camera");
-	    this->localCamera->bind (this->localPlayer);
-	    /*monitor progress*/
-	    this->glmis->step();	    
-
->>>>>>> .merge-right.r3604
+
 	    // Create SkySphere
 	    this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
@@ -404,83 +279,4 @@
 	  //  trackManager->setBindSlave(env);
 
-<<<<<<< .working
-=======
-	    
-	    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(PSPHERE);
-	    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);
-
-	    //localCamera->setParent(TrackNode::getInstance());
-	    tn->addChild (this->localCamera);
-	    this->localPlayer->setMode(PNODE_ROTATE_AND_MOVE);
-	    //Vector* cameraOffset = new Vector (0, 5, -10);
-	    Vector* cameraOffset = new Vector (-10, 5, 0);
-	    this->localCamera->setRelCoor (cameraOffset);
-	    trackManager->condition(2, LEFTRIGHT, this->localPlayer);
-
-	    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);
-	    this->localCamera->setName ("camera");
-	    this->localCamera->bind (myPlayer);	
-	    this->localPlayer->addChild (this->localCamera);
-
-	    // Create SkySphere
-	    skySphere = new Skysphere("../data/pictures/sky-replace.jpg");
-	    this->localPlayer->addChild(this->skySphere);
-
-	    Vector* es = new Vector (20, 0, 0);
-	    Quaternion* qs = new Quaternion ();
-	    WorldEntity* pr = new Primitive(PSPHERE);
-	    pr->setName("primitive");
-	    this->spawn(pr, this->localPlayer, es, qs, PNODE_ROTATE_AND_MOVE);
-
-	    lightMan->getLight(0)->setParent(trackManager->getTrackNode());
-	    break;
-	  }
-	default:
-	  printf("World::load() - no world with ID %i found", this->debugWorldNr );
-	}
-    }
-  else if(this->worldName != NULL)
-    {
-
-    }
-
->>>>>>> .merge-right.r3604
   // initialize debug coord system
   objectList = glGenLists(1);
