Index: /branches/network/src/world_entities/terrain.cc
===================================================================
--- /branches/network/src/world_entities/terrain.cc	(revision 6290)
+++ /branches/network/src/world_entities/terrain.cc	(revision 6291)
@@ -324,10 +324,5 @@
   setIsOutOfSync( false );
 
-  SYNCHELP_READ_BEGIN();
-  SYNCHELP_READ_STRING( modelFileName, 1024 );
-
-  if ( strcmp(modelFileName, "") )
-    this->loadModel( modelFileName );
-
+  WorldEntity::writeState(data, length, sender);
 }
 
@@ -345,8 +340,5 @@
     *reciever = rec;
 
-    SYNCHELP_WRITE_BEGIN();
-    SYNCHELP_WRITE_STRING( modelFileName );
-
-    return SYNCHELP_WRITE_N;
+    return WorldEntity::readState( data, maxLength );
 
   }
Index: /branches/network/src/world_entities/world_entity.cc
===================================================================
--- /branches/network/src/world_entities/world_entity.cc	(revision 6290)
+++ /branches/network/src/world_entities/world_entity.cc	(revision 6291)
@@ -59,5 +59,5 @@
   this->toList(OM_NULL);
 
-  strncpy( modelFileName, "", 1024 );
+  modelFileName = NULL;
 }
 
@@ -76,4 +76,7 @@
 
   State::getObjectManager()->toList(this, OM_INIT);
+
+  if ( modelFileName )
+  delete modelFileName;
 }
 
@@ -103,7 +106,13 @@
 void WorldEntity::loadModel(const char* fileName, float scaling, unsigned int modelNumber)
 {
+  this->modelNumber = modelNumber;
+  this->modelScaling = scaling;
+
   if ( fileName != NULL && strcmp(fileName, "") )
   {
-    strncpy( modelFileName, fileName, 1024 );
+    if ( modelFileName )
+    delete modelFileName;
+    modelFileName = new char[strlen(fileName)+1];
+    strcpy( modelFileName, fileName );
     // search for the special character # in the LoadParam
     if (strchr(fileName, '#') != NULL)
@@ -133,5 +142,8 @@
   else
   {
-    strncpy( modelFileName, "", 1024 );
+    if ( modelFileName )
+    delete modelFileName;
+    modelFileName = new char[1];
+    strcpy( modelFileName, "" );
     this->setModel(NULL);
   }
@@ -332,2 +344,32 @@
   glPopMatrix();
 }
+
+/**
+ * Writes data from network containing information about the state
+ * @param data pointer to data
+ * @param length length of data
+ * @param sender hostID of sender
+ */
+void WorldEntity::writeState( const byte * data, int length, int sender )
+{
+  SYNCHELP_READ_BEGIN();
+  SYNCHELP_READ_STRINGM( modelFileName );
+  SYNCHELP_READ_FLOAT( modelScaling );
+  SYNCHELP_READ_INT( modelNumber );
+  loadModel( modelFileName );
+}
+
+/**
+ * data copied in data will bee sent to another host
+ * @param data pointer to data
+ * @param maxLength max length of data
+ * @return the number of bytes writen
+ */
+int WorldEntity::readState( byte * data, int maxLength )
+{
+  SYNCHELP_WRITE_BEGIN();
+  SYNCHELP_WRITE_STRING( modelFileName );
+  SYNCHELP_WRITE_FLOAT( modelScaling );
+  SYNCHELP_WRITE_INT( modelNumber );
+  return SYNCHELP_WRITE_N;
+}
Index: /branches/network/src/world_entities/world_entity.h
===================================================================
--- /branches/network/src/world_entities/world_entity.h	(revision 6290)
+++ /branches/network/src/world_entities/world_entity.h	(revision 6291)
@@ -72,7 +72,10 @@
   /** @returns a Reference to the Iterator */
   std::list<WorldEntity*>::iterator& getEntityIterator() { return this->objectListIterator; }
+
+  virtual void      writeState(const byte* data, int length, int sender);
+  virtual int       readState(byte* data, int maxLength );
  protected:
   //  CharacterAttributes*    charAttr;         //!< the character attributes of a world_entity
-   char                   modelFileName[1024];  //!< the filename of the loaded model
+
 
  private:
@@ -85,4 +88,7 @@
   OM_LIST                           objectListNumber;   //!< The ObjectList from ObjectManager this Entity is in.
   std::list<WorldEntity*>::iterator objectListIterator; //!< The iterator position of this Entity in the given list of the ObjectManager.
+  char*                   modelFileName;
+  int                     modelNumber;
+  float                   modelScaling;
 
 
