Index: branches/network/src/story_entities/game_world.cc
===================================================================
--- branches/network/src/story_entities/game_world.cc	(revision 6352)
+++ branches/network/src/story_entities/game_world.cc	(revision 6358)
@@ -17,5 +17,5 @@
 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD
 
-#include "world.h"
+#include "game_world.h"
 
 #include "shell_command.h"
@@ -70,14 +70,16 @@
 
 
-SHELL_COMMAND(speed, World, setSpeed);
-SHELL_COMMAND(togglePNodeVisibility, World, togglePNodeVisibility);
-SHELL_COMMAND(toggleBVVisibility, World, toggleBVVisibility);
+SHELL_COMMAND(speed, GameWorld, setSpeed);
+SHELL_COMMAND(togglePNodeVisibility, GameWorld, togglePNodeVisibility);
+SHELL_COMMAND(toggleBVVisibility, GameWorld, toggleBVVisibility);
 
 using namespace std;
 
-//! This creates a Factory to fabricate a World
-CREATE_FACTORY(World, CL_WORLD);
-
-World::World(const TiXmlElement* root)
+//! This creates a Factory to fabricate a GameWorld
+CREATE_FACTORY(GameWorld, CL_GAME_WORLD);
+
+
+
+GameWorld::GameWorld(const TiXmlElement* root)
 {
   this->constuctorInit("", -1);
@@ -88,13 +90,13 @@
 
 /**
- *  remove the World from memory
+ *  remove the GameWorld from memory
  *
  *  delete everything explicitly, that isn't contained in the parenting tree!
  *  things contained in the tree are deleted automaticaly
  */
-World::~World ()
+GameWorld::~GameWorld ()
 {
   delete this->shell;
-  PRINTF(3)("World::~World() - deleting current world\n");
+  PRINTF(3)("GameWorld::~GameWorld() - deleting current world\n");
 
   delete this->localPlayer;
@@ -129,5 +131,5 @@
 
 /**
- * initializes the world.
+ *  initializes the world.
  * @param name the name of the world
  * @param worldID the ID of this world
@@ -139,7 +141,7 @@
  * NO LEVEL LOADING HERE - NEVER!
 */
-void World::constuctorInit(const char* name, int worldID)
-{
-  this->setClassID(CL_WORLD, "World");
+void GameWorld::constuctorInit(const char* name, int worldID)
+{
+  this->setClassID(CL_GAME_WORLD, "GameWorld");
 
   this->setName(name);
@@ -156,19 +158,19 @@
 
 /**
- * loads the parameters of a World from an XML-element
+ * loads the parameters of a GameWorld from an XML-element
  * @param root the XML-element to load from
  */
-void World::loadParams(const TiXmlElement* root)
-{
-  PRINTF(4)("Creating a World\n");
-
-  LoadParam(root, "identifier", this, World, setStoryID)
+void GameWorld::loadParams(const TiXmlElement* root)
+{
+  PRINTF(4)("Creating a GameWorld\n");
+
+  LoadParam(root, "identifier", this, GameWorld, setStoryID)
     .describe("Sets the StoryID of this world");
 
-  LoadParam(root, "nextid", this, World, setNextStoryID)
+  LoadParam(root, "nextid", this, GameWorld, setNextStoryID)
     .describe("Sets the ID of the next world");
 
-  LoadParam(root, "path", this, World, setPath)
-    .describe("The Filename of this World (relative from the data-dir)");
+  LoadParam(root, "path", this, GameWorld, setPath)
+    .describe("The Filename of this GameWorld (relative from the data-dir)");
 }
 
@@ -179,5 +181,5 @@
  * before the load and after the proceeding storyentity has finished
 */
-ErrorMessage World::preLoad()
+ErrorMessage GameWorld::preLoad()
 {
   State::setObjectManager(&this->objectManager);
@@ -195,5 +197,5 @@
 
   this->localCamera = new Camera();
-  this->localCamera->setName ("World-Camera");
+  this->localCamera->setName ("GameWorld-Camera");
 
   State::setCamera(this->localCamera, this->localCamera->getTarget());
@@ -205,7 +207,7 @@
 
 /**
- *  loads the World by initializing all resources, and set their default values.
+ *  loads the GameWorld by initializing all resources, and set their default values.
  */
-ErrorMessage World::load()
+ErrorMessage GameWorld::load()
 {
   PRINTF(3)("> Loading world: '%s'\n", getPath());
@@ -215,6 +217,6 @@
   if( getPath() == NULL)
     {
-      PRINTF(1)("World has no path specified for loading");
-      return (ErrorMessage){213,"Path not specified","World::load()"};
+      PRINTF(1)("GameWorld has no path specified for loading");
+      return (ErrorMessage){213,"Path not specified","GameWorld::load()"};
     }
 
@@ -226,5 +228,5 @@
     PRINTF(1)("loading XML File: %s @ %s:l%d:c%d\n", XMLDoc->ErrorDesc(), this->getPath(), XMLDoc->ErrorRow(), XMLDoc->ErrorCol());
     delete XMLDoc;
-    return (ErrorMessage){213,"XML File parsing error","World::load()"};
+    return (ErrorMessage){213,"XML File parsing error","GameWorld::load()"};
   }
 
@@ -238,5 +240,5 @@
       PRINTF(1)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n");
       delete XMLDoc;
-      return (ErrorMessage){213,"Path not a WorldDataFile","World::load()"};
+      return (ErrorMessage){213,"Path not a WorldDataFile","GameWorld::load()"};
     }
 
@@ -246,5 +248,5 @@
   if( string == NULL)
     {
-      PRINTF(2)("World is missing a proper 'name'\n");
+      PRINTF(2)("GameWorld is missing a proper 'name'\n");
       this->setName("Unknown");
     }
@@ -281,5 +283,5 @@
   if( element == NULL)
     {
-      PRINTF(1)("World is missing 'WorldEntities'\n");
+      PRINTF(1)("GameWorld is missing 'WorldEntities'\n");
     }
   else
@@ -353,25 +355,5 @@
   SoundEngine::getInstance()->setListener(this->localCamera);
 
-
-
-  ////////////
-  // STATIC //
-  ////////////
-
-
-//   TestEntity* testEntity = new TestEntity();
-//   testEntity->setRelCoor(Vector(570, 10, -15));
-//   testEntity->setRelDir(Quaternion(M_PI, Vector(0, 1, 0)));
-//   this->spawn(testEntity);
-
-  for(int i = 0; i < 100; i++)
-  {
-    WorldEntity* tmp = new NPCTest1();
-    char npcChar[10];
-    sprintf (npcChar, "NPC_%d", i);
-        tmp->setName(npcChar);
-    tmp->setAbsCoor(((float)rand()/RAND_MAX) * 5000, 50/*+ (float)rand()/RAND_MAX*20*/, ((float)rand()/RAND_MAX -.5) *30);
-    this->spawn(tmp);
-  }
+  /* some static stuff*/
 
   this->music = NULL;
@@ -380,5 +362,5 @@
 }
 
-ErrorMessage World::postLoad()
+ErrorMessage GameWorld::postLoad()
 {
   this->releaseLoadScreen();
@@ -387,10 +369,10 @@
 
 /**
- *  initializes a new World shortly before start
+ *  initializes a new GameWorld shortly before start
  *
  * this is the function, that will be loaded shortly before the world is
  * started
 */
-ErrorMessage World::preStart()
+ErrorMessage GameWorld::preStart()
 {
   this->bPause = false;
@@ -403,7 +385,7 @@
 
 /**
- *  starts the World
+ *  starts the GameWorld
  */
-ErrorMessage World::start()
+ErrorMessage GameWorld::start()
 {
   this->bQuitWorld = false;
@@ -416,7 +398,7 @@
    This happens, when the player decides to end the Level.
 */
-ErrorMessage World::stop()
-{
-  PRINTF(3)("World::stop() - got stop signal\n");
+ErrorMessage GameWorld::stop()
+{
+  PRINTF(3)("GameWorld::stop() - got stop signal\n");
   this->bQuitWorld= true;
 }
@@ -425,5 +407,5 @@
  *  pauses the Game
 */
-ErrorMessage World::pause()
+ErrorMessage GameWorld::pause()
 {
   this->isPaused = true;
@@ -433,5 +415,5 @@
  *  ends the pause Phase
 */
-ErrorMessage World::resume()
+ErrorMessage GameWorld::resume()
 {
   this->isPaused = false;
@@ -439,7 +421,7 @@
 
 /**
- *  destroys the World
-*/
-ErrorMessage World::destroy()
+ *  destroys the GameWorld
+*/
+ErrorMessage GameWorld::destroy()
 {
 
@@ -449,7 +431,7 @@
  *  shows the loading screen
 */
-void World::displayLoadScreen ()
-{
-  PRINTF(3)("World::displayLoadScreen - start\n");
+void GameWorld::displayLoadScreen ()
+{
+  PRINTF(3)("GameWorld::displayLoadScreen - start\n");
 
   //GLMenuImageScreen*
@@ -457,5 +439,5 @@
   this->glmis->setMaximum(8);
 
-  PRINTF(3)("World::displayLoadScreen - end\n");
+  PRINTF(3)("GameWorld::displayLoadScreen - end\n");
 }
 
@@ -465,9 +447,9 @@
  * @todo take out the delay
 */
-void World::releaseLoadScreen ()
-{
-  PRINTF(3)("World::releaseLoadScreen - start\n");
+void GameWorld::releaseLoadScreen ()
+{
+  PRINTF(3)("GameWorld::releaseLoadScreen - start\n");
   this->glmis->setValue(this->glmis->getMaximum());
-  PRINTF(3)("World::releaseLoadScreen - end\n");
+  PRINTF(3)("GameWorld::releaseLoadScreen - end\n");
   delete this->glmis;
 }
@@ -478,5 +460,5 @@
  * @returns elapsed game time
 */
-double World::getGameTime()
+double GameWorld::getGameTime()
 {
   return this->gameTime;
@@ -488,5 +470,5 @@
  *  synchronize local data with remote data
 */
-void World::synchronize ()
+void GameWorld::synchronize ()
 {
   // Get remote input
@@ -502,5 +484,5 @@
    sdl and has its own event-passing-queue.
 */
-void World::handleInput ()
+void GameWorld::handleInput ()
 {
   EventHandler::getInstance()->process();
@@ -509,5 +491,5 @@
 }
 
-void World::tick(std::list<WorldEntity*> entityList, float dt)
+void GameWorld::tick(std::list<WorldEntity*> entityList, float dt)
 {
   std::list<WorldEntity*>::iterator entity;
@@ -524,5 +506,5 @@
    a heart-beat.
 */
-void World::tick ()
+void GameWorld::tick ()
 {
   Uint32 currentFrame = SDL_GetTicks();
@@ -588,5 +570,5 @@
    state to the whole system.
 */
-void World::update()
+void GameWorld::update()
 {
   GraphicsEngine::getInstance()->update(this->dtS);
@@ -597,5 +579,5 @@
 
 
-void World::collide()
+void GameWorld::collide()
 {
   CDEngine::getInstance()->checkCollisions(this->objectManager.getObjectList(OM_GROUP_00),
@@ -610,5 +592,5 @@
    clear all buffers and draw the world
 */
-void World::display ()
+void GameWorld::display ()
 {
   // clear buffer
@@ -630,5 +612,5 @@
  *  runs through all entities calling their draw() methods
  */
-void World::draw ()
+void GameWorld::draw ()
 {
   GraphicsEngine* engine = GraphicsEngine::getInstance();
@@ -674,8 +656,8 @@
  * collisions drawing everything to the screen.
  */
-void World::mainLoop()
+void GameWorld::mainLoop()
 {
   this->lastFrame = SDL_GetTicks ();
-  PRINTF(3)("World::mainLoop() - Entering main loop\n");
+  PRINTF(3)("GameWorld::mainLoop() - Entering main loop\n");
 
   while(!this->bQuitWorld) /* @todo implement pause */
@@ -698,5 +680,5 @@
   }
 
-  PRINTF(3)("World::mainLoop() - Exiting the main loop\n");
+  PRINTF(3)("GameWorld::mainLoop() - Exiting the main loop\n");
 }
 
@@ -707,5 +689,5 @@
  * @param entity to be added
 */
-void World::spawn(WorldEntity* entity)
+void GameWorld::spawn(WorldEntity* entity)
 {
 //   this->entities->add (entity);
@@ -713,5 +695,5 @@
 }
 
-void World::setPath( const char* name)
+void GameWorld::setPath( const char* name)
 {
   if (this->path)
@@ -729,5 +711,5 @@
 }
 
-const char* World::getPath( void)
+const char* GameWorld::getPath( void)
 {
   return path;
