Index: branches/network/src/story_entities/multi_player_world.cc
===================================================================
--- branches/network/src/story_entities/multi_player_world.cc	(revision 6402)
+++ branches/network/src/story_entities/multi_player_world.cc	(revision 6404)
@@ -16,31 +16,12 @@
 
 #include "multi_player_world.h"
+#include "multi_player_world_data.h"
 
-#include "state.h"
-#include "class_list.h"
-
+#include "factory.h"
 #include "load_param.h"
-#include "fast_factory.h"
-#include "factory.h"
-
-
-#include "shell_command.h"
-#include "resource_manager.h"
-#include "state.h"
-
-#include "game_loader.h"
-#include "glmenu_imagescreen.h"
-
-#include "p_node.h"
-#include "world_entity.h"
-#include "player.h"
-#include "camera.h"
-#include "environment.h"
-#include "terrain.h"
-
-
 
 
 using namespace std;
+
 
 //! This creates a Factory to fabricate a MultiPlayerWorld
@@ -53,6 +34,5 @@
   this->setClassID(CL_MULTI_PLAYER_WORLD, "MultiPlayerWorld");
 
-  this->path = NULL;
-
+  this->multiPlayerWorldData = new MultiPlayerWorldData();
   this->loadParams(root);
 }
@@ -68,26 +48,6 @@
 {
   PRINTF(3)("MultiPlayerWorld::~MultiPlayerWorld() - deleting current world\n");
-}
-
-
-/**
- * initializes the world.
- * @param name the name of the world
- * @param worldID the ID of this world
- *
- * set all stuff here that is world generic and does not use to much memory
- * because the real init() function StoryEntity::init() will be called
- * shortly before start of the game.
- * since all worlds are initiated/referenced before they will be started.
- * NO LEVEL LOADING HERE - NEVER!
-*/
-void MultiPlayerWorld::constuctorInit(const char* name, int worldID)
-{
-  this->gameTime = 0.0f;
-  this->setSpeed(1.0);
-  this->shell = NULL;
-
-  this->showPNodes = false;
-  this->showBV = false;
+  if( this->multiPlayerWorldData)
+    delete this->multiPlayerWorldData;
 }
 
@@ -107,114 +67,4 @@
 
 
-/**
- *  loads the GameWorld by initializing all resources, and set their default values.
- */
-ErrorMessage MultiPlayerWorld::load()
-{
-
-  ////////////////////////////
-  // Loading Spawning Point //
-  ////////////////////////////
-//   element = root->FirstChildElement("SpawningPoints");
-//   if( element == NULL)
-//   {
-//     PRINTF(1)("NetworkWorld is missing 'SpawningPoints'\n");
-//   }
-//   else
-//   {
-//     element = element->FirstChildElement();
-//       // load Players/Objects/Whatever
-//     PRINTF(4)("Loading Spawning Points\n");
-//     while( element != NULL)
-//     {
-//       BaseObject* created = Factory::fabricate(element);
-//       if( created != NULL )
-//       {
-// //        if(created->isA(CL_SPAWNING_POINT))
-// //          this->spawn(dynamic_cast<WorldEntity*>(created));
-//         printf("Created a Spawning Point %s: %s\n", created->getClassName(), created->getName());
-//       }
-//
-//
-//       element = element->NextSiblingElement();
-//       glmis->step(); //! @todo temporary
-//     }
-//     PRINTF(4)("Done loading NetworkWorldEntities\n");
-//   }
-//
-//
-//   ////////////////////////
-//   // find WorldEntities //
-//   ////////////////////////
-//   element = root->FirstChildElement("WorldEntities");
-//   if( element == NULL)
-//   {
-//     PRINTF(1)("NetworkWorld is missing 'WorldEntities'\n");
-//   }
-//   else
-//   {
-//     element = element->FirstChildElement();
-//       // load Players/Objects/Whatever
-//     PRINTF(4)("Loading NetworkWorldEntities\n");
-//     while( element != NULL)
-//     {
-//       if( NetworkManager::getInstance()->isGameServer())
-//       {
-//
-//         BaseObject* created = NetworkGameManager::getInstance()->createEntity(element);
-//         if( created != NULL )
-//         {
-// //          if(created->isA(CL_WORLD_ENTITY))
-// //            this->spawn(dynamic_cast<WorldEntity*>(created));
-//           printf("Created a %s: %s\n", created->getClassName(), created->getName());
-//         }
-//         else
-//           PRINTF(1)("NetworkWorld: could not create this entity\n");
-//
-//           // if we load a 'Player' we use it as localPlayer
-//
-//
-//           //todo do this more elegant
-//         if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox"))
-//           sky = dynamic_cast<WorldEntity*>(created);
-//         if( element->Value() != NULL && !strcmp( element->Value(), "Terrain"))
-//         {
-//           terrain = dynamic_cast<Terrain*>(created);
-//           CDEngine::getInstance()->setTerrain(terrain);
-//
-//         }
-//
-//       }
-//       else if( /* !strcmp( element->Value(), "SkyBox") || */ /* !strcmp( element->Value(), "Terrain") || */ !strcmp( element->Value(), "SpaceShip"))
-//       {
-//         BaseObject* created = Factory::fabricate(element);
-//         if( created != NULL )
-//         {
-// //          if(created->isA(CL_WORLD_ENTITY))
-// //            this->spawn(dynamic_cast<WorldEntity*>(created));
-//           printf("Created a %s: %s\n", created->getClassName(), created->getName());
-//         }
-//         else
-//           PRINTF(1)("NetworkWorld: could not create this entity\n");
-//
-//           // if we load a 'Player' we use it as localPlayer
-//
-//
-//           //todo do this more elegant
-//         if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox"))
-//           sky = dynamic_cast<WorldEntity*>(created);
-//         if( element->Value() != NULL && !strcmp( element->Value(), "Terrain"))
-//         {
-//           terrain = dynamic_cast<Terrain*>(created);
-//           CDEngine::getInstance()->setTerrain(terrain);
-//         }
-//       }
-//       element = element->NextSiblingElement();
-//       glmis->step(); //! @todo temporary
-//       PRINTF(4)("Done loading NetworkWorldEntities\n");
-//     }
-  }
 
 
-
-
