Index: /code/branches/network/src/network/ConnectionManager.cc
===================================================================
--- /code/branches/network/src/network/ConnectionManager.cc	(revision 1712)
+++ /code/branches/network/src/network/ConnectionManager.cc	(revision 1713)
@@ -334,5 +334,9 @@
   }
 
-  void ConnectionManager::syncClassid(int clientID) {
+  /**
+   * 
+   * @param clientID 
+   */
+  void ConnectionManager::syncClassid(unsigned int clientID) {
     unsigned int network_id=0, failures=0;
     std::string classname;
@@ -349,7 +353,7 @@
       COUT(4) << "Con.Man:syncClassid:\tnetwork_id: " << network_id << ", classname: " << classname << std::endl;
 
-      packet::ClassID classid( network_id, classname );
-      classid.setClientID(clientID);
-      while(!classid.send() && failures < 10){
+      packet::ClassID *classid = new packet::ClassID( network_id, classname );
+      classid->setClientID(clientID);
+      while(!classid->send() && failures < 10){
         failures++;
       }
Index: /code/branches/network/src/network/ConnectionManager.h
===================================================================
--- /code/branches/network/src/network/ConnectionManager.h	(revision 1712)
+++ /code/branches/network/src/network/ConnectionManager.h	(revision 1713)
@@ -94,5 +94,5 @@
     //bool createClient(int clientID);
     void disconnectClient(ClientInformation *client);
-    void syncClassid(int clientID);
+    void syncClassid(unsigned int clientID);
 
   private:
Index: /code/branches/network/src/network/packet/Acknowledgement.cc
===================================================================
--- /code/branches/network/src/network/packet/Acknowledgement.cc	(revision 1712)
+++ /code/branches/network/src/network/packet/Acknowledgement.cc	(revision 1713)
@@ -44,5 +44,5 @@
   flags_ = flags_ | PACKET_FLAGS_ACK;
   data_=new unsigned char[ getSize() ];
-  *(ENUM::Type *)&data_[ _PACKETID ] = ENUM::Acknowledgement;
+  *(ENUM::Type *)(data_ + _PACKETID ) = ENUM::Acknowledgement;
   *(unsigned int *)&data_[ _ACKID ] = id;
   clientID_=clientID;
Index: /code/branches/network/src/network/packet/ClassID.cc
===================================================================
--- /code/branches/network/src/network/packet/ClassID.cc	(revision 1712)
+++ /code/branches/network/src/network/packet/ClassID.cc	(revision 1713)
@@ -51,8 +51,8 @@
   data_=new unsigned char[ getSize() ];
   assert(data_);
-  *(ENUM::Type *)&data_[ _PACKETID ] = ENUM::ClassID;
-  *(unsigned int *)&data_[ _CLASSID ] = classID;
-  *(unsigned int *)&data_[ _CLASSNAMELENGTH ] = classNameLength_;
-  memcpy( &data_[ _CLASSNAME ], (void *)className.c_str(), classNameLength_ );
+  *(ENUM::Type *)(data_ + _PACKETID ) = ENUM::ClassID;
+  *(unsigned int *)(data_ + _CLASSID ) = classID;
+  *(unsigned int *)(data_ + _CLASSNAMELENGTH ) = classNameLength_;
+  memcpy( data_+_CLASSNAME, (void *)className.c_str(), classNameLength_ );
 }
 
@@ -72,4 +72,5 @@
 
 bool ClassID::process(){
+  COUT(3) << "processing classid: " << getClassID() << " name: " << &data_[ sizeof(network::packet::ENUM::Type) ] << std::endl;
   orxonox::Identifier *id=ID( std::string((const char*)&data_[ sizeof(network::packet::ENUM::Type) ]) );
   if(id==NULL)
Index: /code/branches/network/src/network/packet/Gamestate.cc
===================================================================
--- /code/branches/network/src/network/packet/Gamestate.cc	(revision 1712)
+++ /code/branches/network/src/network/packet/Gamestate.cc	(revision 1713)
@@ -106,5 +106,5 @@
   //start write gamestate header
   HEADER->packetType = ENUM::Gamestate;
-  assert( *(ENUM::Type *)&data_[ 0 ] == ENUM::Gamestate);
+  assert( *(ENUM::Type *)&data_[ 0 ] == ENUM::Gamestate); 
   HEADER->normsize = currentsize;
   HEADER->id = id;
Index: /code/branches/network/src/network/packet/Packet.cc
===================================================================
--- /code/branches/network/src/network/packet/Packet.cc	(revision 1712)
+++ /code/branches/network/src/network/packet/Packet.cc	(revision 1713)
@@ -61,10 +61,10 @@
 
 void blub(ENetPacket *packet){
-  COUT(0) << "blubb" << std::endl;
+  COUT(4) << "blubb" << std::endl;
 }
 
 Packet::Packet(unsigned char *data, int clientID){
   flags_ = PACKET_FLAG_DEFAULT;
-  packetDirection_ = ENUM::Outgoing;
+  packetDirection_ = ENUM::Incoming;
   clientID_=clientID;
   data_=data;
@@ -72,10 +72,10 @@
 }
 
-Packet::Packet(ENetPacket *packet, ENetPeer *peer){
+/*Packet::Packet(ENetPacket *packet, ENetPeer *peer){
   packetDirection_ = ENUM::Incoming;
   enetPacket_ = packet;
   clientID_ = ClientInformation::findClient(&peer->address)->getID();
   data_ = packet->data;
-}
+}*/
 
 Packet::Packet(const Packet &p){
@@ -107,4 +107,5 @@
     }
     enetPacket_ = enet_packet_create(getData(), getSize(), getFlags());
+    //enetPacket_->freeCallback = &Packet::deletePacket;
     enetPacket_->freeCallback = &blub;
     packetMap_[enetPacket_] = this;
@@ -119,20 +120,26 @@
   unsigned int clientID = ClientInformation::findClient(&peer->address)->getID();
   Packet *p;
+  COUT(3) << "packet type: " << *(ENUM::Type *)&data[_PACKETID] << std::endl;
   switch( *(ENUM::Type *)&data[_PACKETID] )
   {
     case ENUM::Acknowledgement:
+      COUT(3) << "ack" << std::endl;
       p = new Acknowledgement( data, clientID );
       break;
     case ENUM::Chat:
+      COUT(3) << "chat" << std::endl;
       p = new Chat( data, clientID );
       break;
     case ENUM::ClassID:
+      COUT(3) << "classid" << std::endl;
       p = new ClassID( data, clientID );
       break;
     case ENUM::Gamestate:
+      COUT(3) << "gamestate" << std::endl;
       // TODO: remove brackets
       p = new Gamestate( data, true, clientID );
       break;
     case ENUM::Welcome:
+      COUT(3) << "welcome" << std::endl;
       p = new Welcome( data, clientID );
     default:
Index: /code/branches/network/src/network/packet/Packet.h
===================================================================
--- /code/branches/network/src/network/packet/Packet.h	(revision 1712)
+++ /code/branches/network/src/network/packet/Packet.h	(revision 1713)
@@ -75,5 +75,5 @@
     Packet();
     Packet(unsigned char *data, int clientID);
-    Packet(ENetPacket *packet, ENetPeer *peer);
+//    Packet(ENetPacket *packet, ENetPeer *peer);
     enet_uint32 flags_;
     int clientID_;
Index: /code/branches/network/src/network/packet/Welcome.cc
===================================================================
--- /code/branches/network/src/network/packet/Welcome.cc	(revision 1712)
+++ /code/branches/network/src/network/packet/Welcome.cc	(revision 1713)
@@ -49,5 +49,5 @@
   data_=new unsigned char[ getSize() ];
   assert(data_);
-  *(packet::ENUM::Type *)&data_[ _PACKETID ] = packet::ENUM::Welcome;
+  *(packet::ENUM::Type *)(data_ + _PACKETID ) = packet::ENUM::Welcome;
   *(unsigned int *)&data_[ _CLIENTID ] = clientID;
   *(unsigned int *)&data_[ _SHIPID ] = shipID;
