Index: trunk/src/lib/Makefile.am
===================================================================
--- trunk/src/lib/Makefile.am	(revision 6423)
+++ trunk/src/lib/Makefile.am	(revision 6424)
@@ -36,4 +36,5 @@
                         lang/base_object.cc \
                         lang/class_list.cc \
+                        data/data_tank.cc \
                         util/substring.cc \
                         util/color.cc \
@@ -47,4 +48,5 @@
 noinst_HEADERS =        coord/p_node.h \
                         lang/base_object.h \
+                        data/data_tank.h \
                         graphics/render2D/element_2d.h \
                         graphics/render2D/render_2d.h \
@@ -70,5 +72,5 @@
           particles \
           collision_detection \
-	  network \
+	        network \
           parser \
           shell \
Index: trunk/src/lib/coord/p_node.cc
===================================================================
--- trunk/src/lib/coord/p_node.cc	(revision 6423)
+++ trunk/src/lib/coord/p_node.cc	(revision 6424)
@@ -29,4 +29,7 @@
 
 #include "synchronizeable.h"
+
+#include "shell_command.h"
+SHELL_COMMAND(debugNode, PNode, debugNodeSC);
 
 using namespace std;
@@ -152,4 +155,18 @@
   }
 }
+
+
+/**
+ *  init the pnode to a well definied state
+ *
+ * this function actualy only updates the PNode tree
+ */
+void PNode::init()
+{
+  /* just update all aboslute positions via timestep 0.001ms */
+  this->updateNode(0.001f);
+  this->updateNode(0.001f);
+}
+
 
 /**
Index: trunk/src/lib/coord/p_node.h
===================================================================
--- trunk/src/lib/coord/p_node.h	(revision 6423)
+++ trunk/src/lib/coord/p_node.h	(revision 6424)
@@ -78,4 +78,6 @@
 
   void loadParams(const TiXmlElement* root);
+
+  void init();
 
   // ACTIVATION //
@@ -172,4 +174,5 @@
   // DEBUG //
   void countChildNodes(int& nodes) const;
+  void debugNodeSC (unsigned int depth = 1, unsigned int level = 0) { this->debugNode(depth, level); };
   void debugNode (unsigned int depth = 1, unsigned int level = 0) const;
   void debugDraw(unsigned int depth = 1, float size = 1.0, const Vector& color = Vector(1, 0, 0), unsigned int level = 0) const;
Index: trunk/src/lib/data/data_tank.h
===================================================================
--- trunk/src/lib/data/data_tank.h	(revision 6424)
+++ trunk/src/lib/data/data_tank.h	(revision 6424)
@@ -0,0 +1,33 @@
+/*!
+ * @file data_tank.h
+ *  container for all data and data loadings. Its absolutily abstract and therefore generic.
+ *  if there is something to load, this class will serve as a good base class since it
+ *  gives you a basic structure for data loading
+ */
+
+#ifndef _DATA_TANK_H
+#define _DATA_TANK_H
+
+
+#include "base_object.h"
+#include "error.h"
+
+
+//! The DataTank
+class DataTank : public BaseObject
+{
+
+  public:
+    DataTank() {}
+    virtual ~DataTank() {}
+
+    /** initializes the DataTank to be able to load the data */
+    virtual ErrorMessage init() {}
+    /** loads the data into the DataTank @param root is the xml root parameter for for loadParams() connection */
+    virtual ErrorMessage loadData(TiXmlElement* root = NULL) {}
+    /** unloads the data again from the DataTank */
+    virtual ErrorMessage unloadData() {}
+};
+
+
+#endif /* _DATA_TANK_H */
Index: trunk/src/lib/network/network_game_manager.cc
===================================================================
--- trunk/src/lib/network/network_game_manager.cc	(revision 6423)
+++ trunk/src/lib/network/network_game_manager.cc	(revision 6424)
@@ -23,4 +23,7 @@
 #include "network_stream.h"
 #include "converter.h"
+
+#include "p_node.h"
+
 
 /* include your own header */
@@ -237,5 +240,5 @@
  * @param classID: The ID of the class of which an entity should be created
  */
-BaseObject* NetworkGameManager::createEntity( TiXmlElement* element)
+BaseObject* NetworkGameManager::createEntity(const TiXmlElement* element)
 {
   if ( this->isServer() )
@@ -252,5 +255,5 @@
     if ( !b )
     {
-      PRINTF(1)("Could not fabricate Object with classID %x\n", element->Value() );
+      PRINTF(1)("Could not fabricate Object with className %s\n", element->Value() );
       return NULL;
     }
@@ -391,4 +394,6 @@
   //PRINTF(0)("SendEntityList: n = %d\n", networkStream->getSyncCount()-2 );
 
+  int n = 0;
+
   while ( it != e )
   {
@@ -403,4 +408,18 @@
     if ( !writeToClientBuffer( outBuffer[userID], (int)((*it)->getOwner()) ) )
       return;
+
+
+    PRINTF(0)("id = %x %s %s\n", (int)((*it)->getLeafClassID()), (*it)->getClassName(), (*it)->getName());
+
+
+    /*if ( (*it)->isA(CL_WORLD_ENTITY) )
+    {
+      n = dynamic_cast<WorldEntity*>((*it))->readState( outBuffer[userID].buffer, outBuffer[userID].maxLength-outBuffer[userID].length );
+      if ( n = 0 )
+      {
+        PRINTF(2)("n = 0\n");
+      }
+      outBuffer[userID].length += n;
+  }*/
 
     it++;
@@ -436,5 +455,5 @@
  * @param owner: owner of this synchronizealbe
  */
-void NetworkGameManager::doCreateEntity( ClassID classID, int uniqueID, int owner )
+BaseObject* NetworkGameManager::doCreateEntity( ClassID classID, int uniqueID, int owner )
 {
   BaseObject * b = Factory::fabricate( classID );
@@ -443,5 +462,5 @@
   {
     PRINTF(1)("Could not fabricate Object with classID %x\n", classID);
-    return;
+    return NULL;
   }
 
@@ -455,4 +474,5 @@
       s->setIsOutOfSync( true );
     PRINTF(0)("Fabricated %s with id %d\n", s->getClassName(), s->getUniqueID());
+    return b;
   }
   else
@@ -461,4 +481,5 @@
     delete b;
   }
+  return NULL;
 }
 
@@ -695,8 +716,22 @@
     i += Converter::byteArrayToInt( &data[i], &owner );
 
+    PRINTF(0)("before fabricate\n");
     if ( classID != CL_NETWORK_GAME_MANAGER && classID != CL_HANDSHAKE )
-      doCreateEntity( (ClassID)classID, uniqueID, owner );
-
-  }
+    {
+      BaseObject* b = doCreateEntity( (ClassID)classID, uniqueID, owner );
+
+      /*if ( b != NULL )
+      {
+        if ( b->isA(CL_WORLD_ENTITY) )
+        {
+          int n = dynamic_cast<WorldEntity*>(b)->writeState( data, length, sender );
+
+          i += n;
+        }
+    }*/
+    }
+
+  }
+
   return true;
 }
Index: trunk/src/lib/network/network_game_manager.h
===================================================================
--- trunk/src/lib/network/network_game_manager.h	(revision 6423)
+++ trunk/src/lib/network/network_game_manager.h	(revision 6424)
@@ -75,5 +75,5 @@
 
     void createEntity( ClassID classID, int owner = 0 );
-    BaseObject* createEntity( TiXmlElement* element);
+    BaseObject* createEntity(const TiXmlElement* element);
     void removeEntity( int uniqueID );
     void sendYouAre( int uniqueID, int userID );
@@ -94,5 +94,5 @@
     void executeRequestSync( int uniqueID, int user );
 
-    void doCreateEntity(ClassID classID, int uniqueID, int owner);
+    BaseObject* doCreateEntity(ClassID classID, int uniqueID, int owner);
     void doRemoveEntity(int uniqueID);
     void doRequestSync(int uniqueID, int userID);
Index: trunk/src/lib/network/synchronizeable.cc
===================================================================
--- trunk/src/lib/network/synchronizeable.cc	(revision 6423)
+++ trunk/src/lib/network/synchronizeable.cc	(revision 6424)
@@ -36,4 +36,5 @@
   this->networkStream = NULL;
   this->setRequestedSync( false );
+  this->setIsOutOfSync( !(this->isServer()) );
 }
 
