Index: trunk/src/lib/graphics/importer/md2/md2Model.cc
===================================================================
--- trunk/src/lib/graphics/importer/md2/md2Model.cc	(revision 10076)
+++ trunk/src/lib/graphics/importer/md2/md2Model.cc	(revision 10114)
@@ -92,5 +92,5 @@
   rebuildInfo();
 
-  //this->debug();
+  this->debug();
 }
 
@@ -99,4 +99,7 @@
 {
   this->init();
+
+  this->scaleFactor = model.scaleFactor;
+
   this->rebuildInfo();
 }
@@ -104,4 +107,6 @@
 MD2Model& MD2Model::operator=(const MD2Model& md2model)
 {
+  this->init();
+  this->scaleFactor = md2model.scaleFactor;
   this->data = md2model.data;
   this->rebuildInfo();
@@ -141,4 +146,9 @@
   this->data = MD2Data::Pointer(new MD2Data(modelFileName, skinFileName, scale));
   this->rebuildInfo();
+
+  // init the animation - do not remove
+  this->tick( 0.01);
+
+  return true;
 }
 
@@ -268,6 +278,4 @@
 /**
  * @brief draws the model: interface for all other classes out in the world
- * @todo make it const and virtual
- * FIXME
  */
 void MD2Model::draw() const
@@ -313,4 +321,5 @@
       glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]);
       glVertex3fv(this->verticesList[pCommands[2]]);
+//       printf("vertex: %f, %f, %f\n", this->verticesList[pCommands[2]][0], this->verticesList[pCommands[2]][1], this->verticesList[pCommands[2]][2]);
     }
     glEnd();
@@ -325,5 +334,5 @@
 {
   //static sVec3D this->verticesList[MD2_MAX_VERTICES]; /* performance: created only once in a lifetime */
-  int* pCommands = this->data->pGLCommands;
+  //  int* pCommands = this->data->pGLCommands;
   /* some face culling stuff */
   //   glPushAttrib(GL_POLYGON_BIT);
@@ -428,5 +437,6 @@
   PRINT(0)("=  Number of Frames: \t%i\n", this->data->header->numFrames);
   PRINT(0)("=  Height, Width:\t%i, %i\n", this->data->header->skinHeight, this->data->header->skinWidth);
-  //PRINT(0)("=  Pointer to the data object: %p\n", this->data);
+  PRINT(0)("=  DATA:\n");
+  PRINT(0)("=  Number of references to data: %i\n", this->data.count());
   PRINT(0)("===================================================\n\n");
 }
@@ -452,4 +462,6 @@
   this->loadModel(modelFileName);
   this->loadSkin(skinFileName);
+
+  PRINTF(0)("model %s, skin %s\n", modelFileName.c_str(), skinFileName.c_str());
 }
 
@@ -570,4 +582,6 @@
   delete [] buffer;
   fclose(pFile);
+
+  return true;
 }
 
@@ -592,3 +606,5 @@
   this->material.setIllum(3);
   this->material.setAmbient(1.0, 1.0, 1.0);
-}
+
+  return true;
+}
Index: trunk/src/lib/graphics/importer/md2/resource_md2.cc
===================================================================
--- trunk/src/lib/graphics/importer/md2/resource_md2.cc	(revision 10076)
+++ trunk/src/lib/graphics/importer/md2/resource_md2.cc	(revision 10114)
@@ -20,7 +20,8 @@
     PRINTF(0)("NOT FOUND MD2: %s\n", modelName.c_str());
     std::string modelFileName = this->Resource::locateFile(modelName);
-    //std::string skinFileName = this->Resource::locateFile(skinName);
+    std::string skinFileName = this->Resource::locateFile(skinName);
+    PRINTF(0)("NEW %s::%s\n", modelName.c_str(), modelFileName.c_str());
     this->MD2Model::load(modelFileName, skinName, scale);
-    this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinName, scale), keepLevel, this->MD2Model::dataPointer()));
+    this->Resource::addResource(new ResourceMD2::MD2ResourcePointer(loadString(modelName, skinFileName, scale), keepLevel, this->MD2Model::dataPointer()));
   }
 
Index: trunk/src/lib/graphics/light.cc
===================================================================
--- trunk/src/lib/graphics/light.cc	(revision 10076)
+++ trunk/src/lib/graphics/light.cc	(revision 10114)
@@ -26,7 +26,5 @@
 #include "debug.h"
 
-#include "class_id_DEPRECATED.h"
-
-ObjectListDefinitionID(Light, CL_LIGHT);
+ObjectListDefinition(Light);
 CREATE_FACTORY(Light);
 
Index: trunk/src/lib/graphics/render2D/image_plane.cc
===================================================================
--- trunk/src/lib/graphics/render2D/image_plane.cc	(revision 10076)
+++ trunk/src/lib/graphics/render2D/image_plane.cc	(revision 10114)
@@ -23,8 +23,5 @@
 #include "p_node.h"
 
-
-#include "class_id_DEPRECATED.h"
-
-ObjectListDefinitionID(ImagePlane, CL_IMAGE_PLANE);
+ObjectListDefinition(ImagePlane);
 CREATE_FACTORY(ImagePlane);
 
Index: trunk/src/lib/graphics/shader_data.cc
===================================================================
--- trunk/src/lib/graphics/shader_data.cc	(revision 10076)
+++ trunk/src/lib/graphics/shader_data.cc	(revision 10114)
@@ -63,5 +63,8 @@
   {
     PRINTF(2)("Shaders are not supported on your hardware\n");
-  }
+    return true;
+  }
+  
+  return true;
 }
 
Index: trunk/src/lib/graphics/text_engine/limited_width_text.cc
===================================================================
--- trunk/src/lib/graphics/text_engine/limited_width_text.cc	(revision 10076)
+++ trunk/src/lib/graphics/text_engine/limited_width_text.cc	(revision 10114)
@@ -33,4 +33,5 @@
   this->setLineWidth(lineWidth);
 }
+
 
 /**
Index: trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc
===================================================================
--- trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc	(revision 10076)
+++ trunk/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc	(revision 10114)
@@ -26,6 +26,5 @@
 #include "debug.h"
 
-#include "class_id_DEPRECATED.h"
-ObjectListDefinitionID(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN);
+ObjectListDefinition(GLMenuImageScreen);
 CREATE_FACTORY(GLMenuImageScreen);
 
Index: trunk/src/lib/lang/base_object.cc
===================================================================
--- trunk/src/lib/lang/base_object.cc	(revision 10076)
+++ trunk/src/lib/lang/base_object.cc	(revision 10114)
@@ -35,4 +35,17 @@
 }
 
+/** 
+ * copyconstructor
+ * @param bo instance to copy
+ */
+BaseObject::BaseObject( const BaseObject& bo )
+{
+  this->className = "BaseObject";
+  this->objectName = bo.objectName;
+  this->xmlElem = (bo.xmlElem)? bo.xmlElem->Clone() : NULL;
+  this->registerObject( this, BaseObject::_objectList);
+}
+
+
 /**
  * @brief standard deconstructor
@@ -45,5 +58,5 @@
   for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
   {
-    if (ORX_DEBUG >= 5)
+    //if (ORX_DEBUG >= 5)
       assert((*it)._objectList->checkIteratorInList((*it)._iterator) || (*it)._objectList->checkObjectInList(this));
     (*it)._objectList->unregisterObject((*it)._iterator);
Index: trunk/src/lib/lang/base_object.h
===================================================================
--- trunk/src/lib/lang/base_object.h	(revision 10076)
+++ trunk/src/lib/lang/base_object.h	(revision 10114)
@@ -30,4 +30,5 @@
 public:
   BaseObject (const std::string& objectName = "");
+  BaseObject( const BaseObject& bo );
 
   virtual ~BaseObject ();
@@ -51,6 +52,4 @@
   /** @returns the ClassID of this Object */
   inline const ClassID& getClassID() const { return _classes.front()._objectList->identity(); }
-  /** @returns the ID of the Topmost object of the ClassStack */
-  inline const int& getLeafClassID() const { return _classes.front()._objectList->identity().id(); }
 
   bool isA(const ObjectListBase& objectList) const;
Index: trunk/src/lib/lang/object_list.cc
===================================================================
--- trunk/src/lib/lang/object_list.cc	(revision 10076)
+++ trunk/src/lib/lang/object_list.cc	(revision 10114)
@@ -25,5 +25,5 @@
  * @return a new NewObejctList
  */
-ObjectListBase::ObjectListBase(const std::string& className, int id)
+ObjectListBase::ObjectListBase(const std::string& className)
     : _name(className)
 {
@@ -36,10 +36,8 @@
   assert(!ObjectListBase::classNameExists(className) && "Classes should only be included once, and no two classes should have the same name (key value)");
 
-  if (id == -1)
-  {
-    id = ObjectListBase::_classesByID->size();
-    // searching for a free ID
-    while (ObjectListBase::classIDExists(id)) ++id;
-  }
+  int id = ObjectListBase::_classesByID->size();
+  // searching for a free ID
+  while (ObjectListBase::classIDExists(id)) ++id;
+
   assert(!ObjectListBase::classIDExists(id) && "Classes should only be included once, and no two classes should have the same ID (key value)");
 
@@ -330,2 +328,57 @@
     return -1;
 }
+
+
+/**
+ * replace all ids. list must contain all (and no more) ids
+ * @param str2id list: string -> newId
+ */
+void ObjectListBase::replaceIDMap( const std::map< std::string, int >& str2id )
+{
+  if ( str2id.size() != _classesByID->size() )
+  {
+    assert( false && "size of str2id does not match" );
+  }
+
+  IDMap * map = new IDMap();
+
+  std::map< std::string, int >::const_iterator it;
+  for ( it = str2id.begin(); it != str2id.end(); it++ )
+  {
+    assert( _classesByName->find( it->first ) != _classesByName->end() );
+    (*map)[ it->second ] =  (*_classesByName)[it->first];
+    (*map)[ it->second ]->_id = it->second;
+  }
+
+  delete _classesByID;
+  _classesByID = map;
+}
+
+/**
+ *
+ * @return
+ */
+std::map< std::string, int > * ObjectListBase::createStrToId( )
+{
+  std::map< std::string, int > * res = new std::map< std::string, int >();
+
+  NameMap::const_iterator it;
+  for ( it = _classesByName->begin(); it != _classesByName->end(); it++ )
+  {
+    IDMap::const_iterator it2;
+    int id = -1;
+    for ( it2 = _classesByID->begin(); it2 != _classesByID->end(); it2++ )
+    {
+      if ( it->second == it2->second )
+      {
+        id = it2->first;
+        break;
+      }
+    }
+
+    assert( id != -1 );
+    (*res)[ it->first ] = id;
+  }
+
+  return res;
+}
Index: trunk/src/lib/lang/object_list.h
===================================================================
--- trunk/src/lib/lang/object_list.h	(revision 10076)
+++ trunk/src/lib/lang/object_list.h	(revision 10114)
@@ -32,15 +32,7 @@
  * @brief Use this macro to easily define a Class to store its own ObjectListDefinition
  * @param ClassName: the Name of the Class.
- * @param ID: optional set a Fixed ID.
- */
-#define ObjectListDefinitionID(ClassName, ID) \
-   ObjectList<ClassName> ClassName::_objectList(#ClassName, ID)
-
-/**
- * @brief Use this macro to easily define a Class to store its own ObjectListDefinition
- * @param ClassName: the Name of the Class.
  */
 #define ObjectListDefinition(ClassName) \
-    ObjectListDefinitionID(ClassName, -1)
+    ObjectList<ClassName> ClassName::_objectList(#ClassName)
 
 class BaseObject;
@@ -109,5 +101,5 @@
 
 protected:
-  ObjectListBase(const std::string& className, int id = -1);
+  ObjectListBase(const std::string& className);
   virtual ~ObjectListBase();
 
@@ -133,4 +125,8 @@
   static NameMap*               _classesByName;     //!< A Map of all the classes in existance.
   static std::list<std::string> _classNames;        //!< A list of all the registered ClassNames.
+
+public:
+  static void replaceIDMap( const std::map<std::string, int>& str2id );
+  static std::map<std::string, int>* createStrToId();
 };
 
@@ -199,5 +195,5 @@
 
 public:
-  ObjectList(const std::string& name, int id = -1);
+  ObjectList(const std::string& name);
   ~ObjectList();
 
@@ -256,6 +252,6 @@
  */
 template <class T>
-ObjectList<T>::ObjectList(const std::string& name, int id)
-    : ObjectListBase(name, id)
+ObjectList<T>::ObjectList(const std::string& name)
+    : ObjectListBase(name)
 {}
 
Index: trunk/src/lib/network/Makefile.am
===================================================================
--- trunk/src/lib/network/Makefile.am	(revision 10076)
+++ trunk/src/lib/network/Makefile.am	(revision 10114)
@@ -43,4 +43,6 @@
 		      synchronizeable_var/synchronizeable_uint.cc \
 		      synchronizeable_var/synchronizeable_ip.cc \
+		      synchronizeable_var/synchronizeable_classid.cc \
+		      synchronizeable_var/synchronizeable_classid_list.cc \
 		      \
 		      ip.cc
@@ -94,4 +96,6 @@
 		synchronizeable_var/synchronizeable_uint.h \
 		synchronizeable_var/synchronizeable_ip.h \
+		synchronizeable_var/synchronizeable_classid.h \
+		synchronizeable_var/synchronizeable_classid_list.h \
 		\
 		ip.h
Index: trunk/src/lib/network/handshake.cc
===================================================================
--- trunk/src/lib/network/handshake.cc	(revision 10076)
+++ trunk/src/lib/network/handshake.cc	(revision 10114)
@@ -22,4 +22,7 @@
 #include "debug.h"
 
+#include "synchronizeable_var/synchronizeable_classid_list.h"
+
+std::map< std::string, int >* Handshake::classIdList = NULL;
 
 ObjectListDefinition(Handshake);
@@ -32,4 +35,16 @@
   this->registerObject(this, Handshake::_objectList);
 
+  if ( !Handshake::classIdList )
+  {
+    //TODO who else?
+    if ( SharedNetworkData::getInstance()->isMasterServer() )
+    {
+      Handshake::classIdList = ObjectListBase::createStrToId();
+    }
+    else
+    {
+      Handshake::classIdList = new std::map< std::string, int >();
+    }
+  }
 
   // register all variable handlers
@@ -52,4 +67,6 @@
   registerVar( new SynchronizeableIP( &this->proxy2, &this->proxy2, "proxy server 2", PERMISSION_MASTER_SERVER ) );
   registerVar( new SynchronizeableInt( &this->redirectProxy, &this->redirectProxy, "proxy server redirection flag", PERMISSION_MASTER_SERVER ) );
+  
+  registerVar( new SynchronizeableClassIDList( Handshake::classIdList, Handshake::classIdList, "classId List", PERMISSION_MASTER_SERVER ) );
 
 
Index: trunk/src/lib/network/handshake.h
===================================================================
--- trunk/src/lib/network/handshake.h	(revision 10076)
+++ trunk/src/lib/network/handshake.h	(revision 10114)
@@ -113,9 +113,13 @@
     int                errorString_handler;                   //!< handshake error string handler
     int                candel_id;                             //!< handshake deletion handler
-    int                nodeType;                              //!, the type of the network node
+    int                nodeType;                              //!< the type of the network node
 
     int                redirectProxy;                         //!< true if the client should reconnect to a proxy server
     IP                 proxy1;                               //!< ip address of the first proxy (0.0.0.0 of not available)
     IP                 proxy2;                               //!< ip address of the second proxy (0.0.0.0 of not available)
+    
+    static std::map< std::string, int >* classIdList;
+  public:
+    std::map< std::string, int >* getClassIdList(){ return classIdList; }
 };
 
Index: trunk/src/lib/network/message_manager.cc
===================================================================
--- trunk/src/lib/network/message_manager.cc	(revision 10076)
+++ trunk/src/lib/network/message_manager.cc	(revision 10114)
@@ -242,4 +242,10 @@
     assert( i + messageLength <= length );
     // make sure there is a message handler for this message type
+    //if ( !( messageHandlerMap.find( (MessageType)messageType ) != messageHandlerMap.end()) )
+    //{
+//	    PRINTF(0)("messagetype: %d\n", messageType);
+//	    this->objectList().debugAll( 0 );
+//    }
+    
     assert( messageHandlerMap.find( (MessageType)messageType ) != messageHandlerMap.end());
 
Index: trunk/src/lib/network/network_game_manager.cc
===================================================================
--- trunk/src/lib/network/network_game_manager.cc	(revision 10076)
+++ trunk/src/lib/network/network_game_manager.cc	(revision 10114)
@@ -111,5 +111,5 @@
   playable.loadMD2Texture( playableTexture );
   playable.setTeam(team);
-  playable.loadModel( playableModel, 100.0f );
+  playable.loadModel( playableModel, playableScale );
   playable.setOwner( userId );
   playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
Index: trunk/src/lib/network/network_stream.cc
===================================================================
--- trunk/src/lib/network/network_stream.cc	(revision 10076)
+++ trunk/src/lib/network/network_stream.cc	(revision 10114)
@@ -128,4 +128,5 @@
 
   this->bRedirect = false;
+  this->bSoftRedirect = false;
 
   this->currentState = 0;
@@ -716,4 +717,5 @@
               // init the new message manager
               MessageManager::getInstance()->setUniqueID( it->second.handshake->getMessageManagerId() );
+              ObjectListBase::replaceIDMap( *(it->second.handshake->getClassIdList()) );
             }
 
@@ -966,5 +968,5 @@
 
       // if handshake not finished only sync handshake
-      if ( peer->second.handshake && Handshake::staticClassID() != sync.getLeafClassID())
+      if ( peer->second.handshake && Handshake::staticClassID() != sync.getClassID() )
         continue;
 
@@ -972,14 +974,14 @@
       if ( ( SharedNetworkData::getInstance()->isMasterServer() ||
              SharedNetworkData::getInstance()->isProxyServerActive() &&  peer->second.isClient())
-	     && Handshake::staticClassID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId )
+	     && Handshake::staticClassID() == sync.getClassID() && sync.getUniqueID() != peer->second.userId )
         continue;
 
       /* list of synchronizeables that will never be synchronized over the network: */
       // do not sync null parent
-      if ( NullParent::staticClassID() == sync.getLeafClassID())
+      if ( NullParent::staticClassID() == sync.getClassID())
         continue;
 
 
-      assert( sync.getLeafClassID() != 0);
+      assert( sync.getClassID() != 0);
 
       assert( offset + INTSIZE <= UDP_PACKET_SIZE );
@@ -1188,14 +1190,14 @@
 	  if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId)
           {
-            PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId);
+            PRINTF(0)("Don't create Object with ID %d, ignored!\n", (int)leafClassId);
             offset += syncDataLength;
             continue;
           }
           else
-	    ; /// FIXME CLASS_ID :: b = Factory::fabricate( leafClassId );
-
+		  b = Factory::fabricate( ObjectListBase::retrieveIdentity( leafClassId )  );
+	  
           if ( !b )
           {
-            PRINTF(1)("Could not fabricate Object with classID %x\n", leafClassId);
+            PRINTF(1)("Could not fabricate Object with classID %d\n", leafClassId);
             offset += syncDataLength;
             continue;
@@ -1208,9 +1210,9 @@
             sync->setSynchronized(true);
 
-            PRINTF(0)("Fabricated %s with id %d\n", sync->getClassCName(), sync->getUniqueID());
+            PRINTF(1)("Fabricated %s with id %d\n", sync->getClassCName(), sync->getUniqueID());
           }
           else
           {
-            PRINTF(1)("Class with ID %x is not a synchronizeable!\n", (int)leafClassId);
+            PRINTF(1)("Class with ID %d is not a synchronizeable!\n", (int)leafClassId);
             delete b;
             offset += syncDataLength;
Index: trunk/src/lib/network/peer_info.h
===================================================================
--- trunk/src/lib/network/peer_info.h	(revision 10076)
+++ trunk/src/lib/network/peer_info.h	(revision 10114)
@@ -36,5 +36,5 @@
     int                 userId;                  //!< id of this network node
     int                 nodeType;                //!< type of this network node
-    IP                  ip;                      //!> the ip address of this network node
+    IP                  ip;                      //!< the ip address of this network node
 
     NetworkSocket *     socket;                  //!< socket connecting to this node
Index: trunk/src/lib/network/player_stats.cc
===================================================================
--- trunk/src/lib/network/player_stats.cc	(revision 10076)
+++ trunk/src/lib/network/player_stats.cc	(revision 10114)
@@ -30,7 +30,7 @@
 #include "shell_command.h"
 
-#include "class_id_DEPRECATED.h"
-
-ObjectListDefinitionID(PlayerStats, CL_PLAYER_STATS);
+
+
+ObjectListDefinition(PlayerStats);
 CREATE_FACTORY(PlayerStats);
 
Index: trunk/src/lib/network/synchronizeable.cc
===================================================================
--- trunk/src/lib/network/synchronizeable.cc	(revision 10076)
+++ trunk/src/lib/network/synchronizeable.cc	(revision 10114)
@@ -30,4 +30,6 @@
 
 #include "converter.h"
+
+#include "synchronizeable_var/synchronizeable_classid.h"
 
 
@@ -56,5 +58,7 @@
   /* make sure loadClassId is first synced var because this is read by networkStream */
   assert( syncVarList.size() == 0 );
-  mLeafClassId = this->registerVarId( new SynchronizeableInt( (int*)&this->getLeafClassID(), (int*)&this->getLeafClassID(), "leafClassId", PERMISSION_MASTER_SERVER) );
+  assert( this->getClassID() == this->objectList().id() );
+  
+  mLeafClassId = this->registerVarId( new SynchronizeableClassID( this, "leafClassId", PERMISSION_MASTER_SERVER) );
 
   this->registerVar( new SynchronizeableInt( &this->owner, &this->owner, "owner", PERMISSION_MASTER_SERVER ) );
@@ -267,5 +271,5 @@
 //       PRINTF(0)("sending %s %d\n", (*it)->getName().c_str(), n);
 
-//       if( this->isA(CL_PLAYABLE))
+//       if( this->isA( Playable::staticClassID() ))
 //       {
 //         PRINTF(0)("ms: %i, ps: %i, c: %i, sender: %i, reciever: %i, owner: %i, perm: (ow %i, ms %i, s %i, a %i)\n",
@@ -453,5 +457,5 @@
       //(*it)->debug();
 
-//       if( this->isA(CL_PLAYABLE))
+//       if( this->isA(Playable::staticClassID()))
 //       {
 //         PRINTF(0)("ms: %i, ps: %i, c: %i, sender: %i, reciever: %i, owner: %i, perm: (ow %i, ms %i, s %i, a %i)\n",
Index: trunk/src/lib/network/synchronizeable_var/synchronizeable_classid.cc
===================================================================
--- trunk/src/lib/network/synchronizeable_var/synchronizeable_classid.cc	(revision 10114)
+++ trunk/src/lib/network/synchronizeable_var/synchronizeable_classid.cc	(revision 10114)
@@ -0,0 +1,75 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Christoph Renner
+   co-programmer: ...
+*/
+
+
+#include "synchronizeable_classid.h"
+#include "converter.h"
+
+#include <cassert>
+
+/**
+ * standard constructor
+ * @todo this constructor is not jet implemented - do it
+*/
+SynchronizeableClassID::SynchronizeableClassID( BaseObject * ptrIn, std::string name, int permission, int priority) : SynchronizeableVar( ptrIn, ptrIn, name, INTSIZE, permission, priority )
+{
+  this->vPtrIn = ptrIn;
+  this->vPtrOut = ptrIn;
+}
+
+
+/**
+ * standard deconstructor
+*/
+SynchronizeableClassID::~SynchronizeableClassID ()
+{
+}
+
+/**
+ * write var data to byte buffer
+ * @param buf pointer to write to
+ * @param maxLength writeToBuf will not write more than maxLength bytes
+ * @return number bytes written
+ */
+int SynchronizeableClassID::writeToBuf( byte * buf, int maxLength )
+{
+  int res = Converter::intToByteArray( vPtrIn->getClassID().id(), buf, maxLength );
+
+  assert( res == INTSIZE );
+
+  return res;
+}
+
+/**
+ * read var data from byte buffer. actually this function does nothing but 
+ * return INTSIZE
+ * @param buf pointer to read from
+ * @param maxLength readFromBuf will not read more than maxLength bytes
+ * @return number bytes read
+ */
+int SynchronizeableClassID::readFromBuf( byte * buf, int maxLength )
+{
+  return INTSIZE;
+}
+
+
+/**
+ * print out variable value
+ */
+void SynchronizeableClassID::debug( )
+{
+  printf( "SYNCHRONIZEABLE_VAR: %s IN: %d\n", name.c_str(), vPtrIn->getClassID().id() );
+}
+
Index: trunk/src/lib/network/synchronizeable_var/synchronizeable_classid.h
===================================================================
--- trunk/src/lib/network/synchronizeable_var/synchronizeable_classid.h	(revision 10114)
+++ trunk/src/lib/network/synchronizeable_var/synchronizeable_classid.h	(revision 10114)
@@ -0,0 +1,38 @@
+/*!
+ * @file synchronizeable_int.h
+ * @brief Definition of SynchronizeableInt
+*/
+
+
+#ifndef _SYNCHRONIZEABLE_CLASSID_H
+#define _SYNCHRONIZEABLE_CLASSID_H
+
+#include "synchronizeable_var.h"
+
+class BaseObject;
+
+class SynchronizeableClassID : public SynchronizeableVar {
+
+  public:
+    SynchronizeableClassID( BaseObject * ptrIn, std::string name, int permission, int priority = 0 );
+    virtual ~SynchronizeableClassID();
+
+    virtual int writeToBuf( byte * buf, int maxLength );
+    virtual int readFromBuf( byte * buf, int maxLength );
+
+    /**
+     * check if writeToBuf will return the same size every time
+     * @return true if same size every time
+     */
+    virtual bool hasStaticSize(){ return true; };
+
+    virtual void debug();
+
+  protected:
+    BaseObject * vPtrIn;       //!< pointer to data (read)
+    BaseObject * vPtrOut;      //!< pointer to data (write)
+
+
+};
+
+#endif /* _PROTO_CLASS_H */
Index: trunk/src/lib/network/synchronizeable_var/synchronizeable_classid_list.cc
===================================================================
--- trunk/src/lib/network/synchronizeable_var/synchronizeable_classid_list.cc	(revision 10114)
+++ trunk/src/lib/network/synchronizeable_var/synchronizeable_classid_list.cc	(revision 10114)
@@ -0,0 +1,176 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Christoph Renner
+   co-programmer: ...
+*/
+
+
+#include "synchronizeable_classid_list.h"
+#include "converter.h"
+#include <cassert>
+
+
+/**
+ * standard constructor
+ * @todo this constructor is not jet implemented - do it
+*/
+SynchronizeableClassIDList::SynchronizeableClassIDList( std::map< std::string, int > * ptrIn, std::map< std::string, int > * ptrOut, std::string name, int permission, int priority) : SynchronizeableVar( ptrIn, ptrOut, name, 0, permission, priority )
+{
+  this->vPtrIn = ptrIn;
+  this->vPtrOut = ptrOut;
+}
+
+
+/**
+ * standard deconstructor
+*/
+SynchronizeableClassIDList::~SynchronizeableClassIDList ()
+{
+}
+
+/**
+ * write var data to byte buffer
+ * @param buf pointer to write to
+ * @param maxLength writeToBuf will not write more than maxLength bytes
+ * @return number bytes written
+ */
+int SynchronizeableClassIDList::writeToBuf( byte * buf, int maxLength )
+{
+  int res = 0;
+  int n;
+
+  std::map< std::string, int >::const_iterator it;
+  
+  n = Converter::intToByteArray( vPtrIn->size(), buf, maxLength );
+  assert( n == INTSIZE );
+  res += n;
+  
+  for ( it = vPtrIn->begin(); it != vPtrIn->end(); it++ )
+  {
+    n = Converter::stringToByteArray( it->first, buf+res, maxLength-res );
+    assert( n == (int)it->first.length()+INTSIZE );
+    res += n;
+    
+    n = Converter::intToByteArray( it->second, buf+res, maxLength-res );
+    assert( n == INTSIZE );
+    res += n;
+  }
+
+  return res;
+}
+
+int SynchronizeableClassIDList::getSize()
+{
+   int res = 0;
+   
+   std::map< std::string, int >::const_iterator it;
+  
+   res += INTSIZE;
+  
+   for ( it = vPtrIn->begin(); it != vPtrIn->end(); it++ )
+   {
+     res += it->first.length()+2*INTSIZE;
+   }
+   
+   return res;
+}
+
+/**
+ * read var data from byte buffer
+ * @param buf pointer to read from
+ * @param maxLength readFromBuf will not read more than maxLength bytes
+ * @return number bytes read
+ */
+int SynchronizeableClassIDList::readFromBuf( byte * buf, int maxLength )
+{
+  setHasChanged( false );
+
+  int res = 0;
+  int num;
+  
+  assert( maxLength >= INTSIZE );
+  int n = Converter::byteArrayToInt( buf, &num );
+  assert( n == INTSIZE );
+  res += n;
+  
+  int id;
+  std::string name;
+  
+  for ( int i = 0; i < num; i++ )
+  {
+    n = Converter::byteArrayToString( buf+res, name, maxLength-res );
+    assert( n > 0 );
+    res += n;
+    
+    n = Converter::byteArrayToInt( buf+res, &id );
+    assert( n == INTSIZE );
+    res += n;
+    
+    if ( vPtrOut->find(name) == vPtrOut->end() )
+      setHasChanged( true );
+    else
+    {
+      if ( (*vPtrOut)[name] != id )
+      {
+        setHasChanged( true );
+      }
+    }
+    
+    (*vPtrOut)[name] = id;
+  }
+
+  return res;
+}
+
+/**
+ * print out variable value
+ */
+void SynchronizeableClassIDList::debug( )
+{
+
+}
+
+
+/**
+ * reads actual size from buffer. this is used when size is not constant
+ * @param buf pointer to data
+ * @param maxLength maximal size of data
+ * @return same as readFromBuf would return
+ */
+int SynchronizeableClassIDList::getSizeFromBuf( byte * buf, int maxLength )
+{
+  int res = 0;
+  int num;
+  
+  assert( maxLength >= INTSIZE );
+  int n = Converter::byteArrayToInt( buf, &num );
+  assert( n == INTSIZE );
+  res += n;
+  
+  int id;
+  std::string name;
+  
+  for ( int i = 0; i < num; i++ )
+  {
+    n = Converter::byteArrayToString( buf+res, name, maxLength-res );
+    assert( n > 0 );
+    res += n;
+    
+    n = Converter::byteArrayToInt( buf+res, &id );
+    assert( n == INTSIZE );
+    res += n;
+  }
+
+  return res;
+}
+
+
Index: trunk/src/lib/network/synchronizeable_var/synchronizeable_classid_list.h
===================================================================
--- trunk/src/lib/network/synchronizeable_var/synchronizeable_classid_list.h	(revision 10114)
+++ trunk/src/lib/network/synchronizeable_var/synchronizeable_classid_list.h	(revision 10114)
@@ -0,0 +1,42 @@
+/*!
+ * @file synchronizeable_classid_list.h
+ * @brief Definition of SynchronizeableClassIDList
+*/
+
+#ifndef _SYNCHRONIZEABLE_CLASSID_LIST_H
+#define _SYNCHRONIZEABLE_CLASSID_LIST_H
+
+#include "synchronizeable_var.h"
+
+#include <map>
+#include <string>
+
+class SynchronizeableClassIDList : public SynchronizeableVar {
+
+  public:
+    SynchronizeableClassIDList( std::map< std::string, int > * ptrIn, std::map< std::string, int > * ptrOut, std::string name, int permission, int priority = 0 );
+    virtual ~SynchronizeableClassIDList();
+
+    virtual int writeToBuf( byte * buf, int maxLength );
+    virtual int readFromBuf( byte * buf, int maxLength );
+
+
+    /**
+     * check if writeToBuf will return the same size every time
+     * @return true if same size every time
+     */
+    virtual bool hasStaticSize(){ return false; };
+
+    virtual int getSize();
+
+    virtual int getSizeFromBuf( byte * buf, int maxLength );
+
+    virtual void debug();
+
+  private:
+    std::map< std::string, int > * vPtrIn;       //!< pointer to data (read)
+    std::map< std::string, int > * vPtrOut;      //!< pointer to data (write)
+
+};
+
+#endif /* _SYNCHRONIZEABLE_STRING_H */
Index: trunk/src/lib/physics/fields/gravity.cc
===================================================================
--- trunk/src/lib/physics/fields/gravity.cc	(revision 10076)
+++ trunk/src/lib/physics/fields/gravity.cc	(revision 10114)
@@ -21,6 +21,6 @@
 #include "util/loading/factory.h"
 
-#include "class_id_DEPRECATED.h"
-ObjectListDefinitionID(Gravity, CL_FIELD_GRAVITY);
+
+ObjectListDefinition(Gravity);
 
 CREATE_FACTORY(Gravity);
Index: trunk/src/lib/physics/fields/point_gravity.cc
===================================================================
--- trunk/src/lib/physics/fields/point_gravity.cc	(revision 10076)
+++ trunk/src/lib/physics/fields/point_gravity.cc	(revision 10114)
@@ -20,6 +20,6 @@
 
 
-#include "class_id_DEPRECATED.h"
-ObjectListDefinitionID(PointGravity, CL_FIELD_POINT_GRAVITY);
+
+ObjectListDefinition(PointGravity);
 
 
Index: trunk/src/lib/physics/fields/twirl.cc
===================================================================
--- trunk/src/lib/physics/fields/twirl.cc	(revision 10076)
+++ trunk/src/lib/physics/fields/twirl.cc	(revision 10114)
@@ -20,6 +20,6 @@
 
 
-#include "class_id_DEPRECATED.h"
-ObjectListDefinitionID(Twirl, CL_FIELD_TWIRL);
+
+ObjectListDefinition(Twirl);
 
 
Index: trunk/src/lib/physics/physics_connection.cc
===================================================================
--- trunk/src/lib/physics/physics_connection.cc	(revision 10076)
+++ trunk/src/lib/physics/physics_connection.cc	(revision 10114)
@@ -28,5 +28,5 @@
 #include "util/loading/load_param.h"
 
-#include "class_id_DEPRECATED.h"
+
 ObjectListDefinition(PhysicsConnection);
 CREATE_FACTORY(PhysicsConnection);
