Index: branches/network/src/lib/network/Makefile.am
===================================================================
--- branches/network/src/lib/network/Makefile.am	(revision 9905)
+++ branches/network/src/lib/network/Makefile.am	(revision 9906)
@@ -43,4 +43,5 @@
 		      synchronizeable_var/synchronizeable_uint.cc \
 		      synchronizeable_var/synchronizeable_ip.cc \
+		      synchronizeable_var/synchronizeable_classid.cc \
 		      \
 		      ip.cc
@@ -94,4 +95,5 @@
 		synchronizeable_var/synchronizeable_uint.h \
 		synchronizeable_var/synchronizeable_ip.h \
+		synchronizeable_var/synchronizeable_classid.h \
 		\
 		ip.h
Index: branches/network/src/lib/network/message_manager.cc
===================================================================
--- branches/network/src/lib/network/message_manager.cc	(revision 9905)
+++ branches/network/src/lib/network/message_manager.cc	(revision 9906)
@@ -242,9 +242,9 @@
     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 );
-    }
+    //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: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 9905)
+++ branches/network/src/lib/network/network_stream.cc	(revision 9906)
@@ -1188,5 +1188,5 @@
 	  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;
@@ -1194,8 +1194,8 @@
           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 +1208,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: branches/network/src/lib/network/synchronizeable.cc
===================================================================
--- branches/network/src/lib/network/synchronizeable.cc	(revision 9905)
+++ branches/network/src/lib/network/synchronizeable.cc	(revision 9906)
@@ -30,4 +30,6 @@
 
 #include "converter.h"
+
+#include "synchronizeable_var/synchronizeable_classid.h"
 
 
@@ -57,5 +59,6 @@
   assert( syncVarList.size() == 0 );
   assert( this->getClassID() == this->objectList().id() );
-  mLeafClassId = this->registerVarId( new SynchronizeableInt( (int*)&leafClassID, (int*)&leafClassID, "leafClassId", PERMISSION_MASTER_SERVER) );
+  
+  mLeafClassId = this->registerVarId( new SynchronizeableClassID( this, "leafClassId", PERMISSION_MASTER_SERVER) );
 
   this->registerVar( new SynchronizeableInt( &this->owner, &this->owner, "owner", PERMISSION_MASTER_SERVER ) );
Index: branches/network/src/lib/network/synchronizeable_var/synchronizeable_classid.cc
===================================================================
--- branches/network/src/lib/network/synchronizeable_var/synchronizeable_classid.cc	(revision 9906)
+++ branches/network/src/lib/network/synchronizeable_var/synchronizeable_classid.cc	(revision 9906)
@@ -0,0 +1,76 @@
+/*
+   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->getLeafClassID().id(), buf, maxLength );
+  printf( "%s has id %d\n", vPtrIn->getClassName().c_str(), vPtrIn->getLeafClassID().id() );
+
+  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: branches/network/src/lib/network/synchronizeable_var/synchronizeable_classid.h
===================================================================
--- branches/network/src/lib/network/synchronizeable_var/synchronizeable_classid.h	(revision 9906)
+++ branches/network/src/lib/network/synchronizeable_var/synchronizeable_classid.h	(revision 9906)
@@ -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 */
