Index: branches/network/src/lib/network/message_manager.cc
===================================================================
--- branches/network/src/lib/network/message_manager.cc	(revision 7684)
+++ branches/network/src/lib/network/message_manager.cc	(revision 7693)
@@ -184,5 +184,16 @@
     if ( std::find( messageQueue[userId].recievedMessages.begin(), messageQueue[userId].recievedMessages.end(), number )== messageQueue[userId].recievedMessages.end() )
     {
-      (*(messageHandlerMap[(MessageId)messageId].cb))( (MessageId)messageId, data + i, messageLength, messageHandlerMap[(MessageId)messageId].someData, userId );
+      if ( !(*(messageHandlerMap[(MessageId)messageId].cb))( (MessageId)messageId, data + i, messageLength, messageHandlerMap[(MessageId)messageId].someData, userId ) )
+      {
+        NetworkMessage msg;
+        
+        msg.data = new byte[messageLength];
+        memcpy( msg.data, data + i, messageLength );
+        msg.length = messageLength;
+        msg.messageId = (MessageId)messageId;
+        msg.number = userId;
+        
+        incomingMessabeBuffer.push_back( msg );
+      }
       messageQueue[userId].recievedMessages.push_back( number );
     }
@@ -190,4 +201,16 @@
   }
   
+  
+  for ( std::list<NetworkMessage>::iterator it = incomingMessabeBuffer.begin(); it != incomingMessabeBuffer.end(); it++ )
+  {
+    if ( (*(messageHandlerMap[it->messageId].cb))( it->messageId, data + i, it->length, messageHandlerMap[it->messageId].someData, it->number ) )
+    {
+      std::list<NetworkMessage>::iterator delIt = it;
+      it++;
+      incomingMessabeBuffer.erase( delIt );
+      continue;
+    }
+    it++;
+  }
   
   //walk throu message queue and remove acked messages
Index: branches/network/src/lib/network/message_manager.h
===================================================================
--- branches/network/src/lib/network/message_manager.h	(revision 7684)
+++ branches/network/src/lib/network/message_manager.h	(revision 7693)
@@ -28,8 +28,9 @@
 enum MessageId 
 {
-  TESTMESSAGEID = 1
+  TESTMESSAGEID = 1,
+  MSGID_YOU_ARE
 };
 
-typedef void (*MessageCallback)( MessageId messageId, byte * data, int dataLength, void * someData, int userId );
+typedef bool (*MessageCallback)( MessageId messageId, byte * data, int dataLength, void * someData, int userId );
 
 enum RecieverType
@@ -96,9 +97,10 @@
 
  private:
-   static MessageManager * singletonRef;
-   MessageQueue            messageQueue;        //!< stores messages to send
-   MessageHandlerMap       messageHandlerMap;   //!< contains handlers for messages
+   static MessageManager *   singletonRef;
+   MessageQueue              messageQueue;           //!< stores messages to send
+   MessageHandlerMap         messageHandlerMap;      //!< contains handlers for messages
 
-   int                     newNumber;           //!< used to create unique message numbers
+   int                       newNumber;              //!< used to create unique message numbers
+   std::list<NetworkMessage> incomingMessabeBuffer; 
 
 };
Index: branches/network/src/lib/network/network_game_manager.cc
===================================================================
--- branches/network/src/lib/network/network_game_manager.cc	(revision 7684)
+++ branches/network/src/lib/network/network_game_manager.cc	(revision 7693)
@@ -27,4 +27,5 @@
 #include "shared_network_data.h"
 #include "converter.h"
+#include "message_manager.h"
 
 #include "playable.h"
@@ -212,10 +213,13 @@
   if ( this->isServer())
   {
-    if ( SharedNetworkData::getInstance()->getNewUniqueID() < 0 )
+    int res = this->executeCreateEntity( classID, SharedNetworkData::getInstance()->getNewUniqueID(), owner );
+    
+    if ( res < 0 )
     {
       PRINTF(1)("Cannot create entity! There are no more uniqueIDs left!\n");
       return -1;
     }
-    return this->executeCreateEntity( classID, SharedNetworkData::getInstance()->getNewUniqueID(), owner );
+    
+    return res;
   }
   else
@@ -461,8 +465,4 @@
 bool NetworkGameManager::signalNewPlayer(int userId)
 {
-#if 0
-  if ( userId >= outBuffer.size() )
-    resizeBufferVector( userId );
-
   /* create new playable for Player*/
   PRINTF(0)("Request for creation: %i\n", userId);
@@ -470,5 +470,4 @@
   PRINTF(0)("Request for creation: userid: %i, uniqueid: %i\n", userId, uniqueId);
   this->sendYouAre(uniqueId, userId);
-#endif
 }
 
@@ -709,21 +708,10 @@
   if ( !isServer() )
     return;
-#if 0
-  if ( userID != 0 )
-  {
-    if ( !writeToClientBuffer( outBuffer[userID], (byte)NET_YOU_ARE_ENTITY ) )
-      return;
-
-    if ( !writeToClientBuffer( outBuffer[userID], uniqueID ) )
-      return;
-  }
-  else
-  {
-#endif
-    doYouAre(uniqueID);
-#if 0
-  }
-#endif
-
+  
+  byte buf[INTSIZE];
+  
+  Converter::intToByteArray( uniqueID, buf, INTSIZE );
+  
+  MessageManager::getInstance()->sendMessage( MSGID_YOU_ARE, buf, INTSIZE, RT_USER, userID, MP_HIGHBANDWIDTH);
 }
 
@@ -939,4 +927,14 @@
 }
 
+bool NetworkGameManager::youAreHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
+{
+  assert( dataLength == INTSIZE );
+  int uniqueId;
+  
+  Converter::byteArrayToInt( data, &uniqueId );
+  
+  NetworkGameManager::getInstance()->doYouAre( uniqueId );
+}
+
 #if 0
 bool NetworkGameManager::writeToClientBuffer( clientBuffer & cb, byte b )
Index: branches/network/src/lib/network/network_game_manager.h
===================================================================
--- branches/network/src/lib/network/network_game_manager.h	(revision 7684)
+++ branches/network/src/lib/network/network_game_manager.h	(revision 7693)
@@ -12,34 +12,9 @@
 /* include base_object.h since all classes are derived from this one */
 #include "synchronizeable.h"
+#include "message_manager.h"
 
 
 class TiXmlElement;
 class PNode;
-
-/**
- * protocol definition
- *
- *  CREATE_ENTITY:       >> CLASS_ID, UNIQUE_ID, OWNER
- *  REMOVE_ENTITY:       >> UNIQUE_ID
- *
- *  CREATE_ENTITY_LIST:  >> NUMBER, [CLASS_ID, UNIQUE_ID, OWNER][0..NUMBER]
- *  REMOVE_ENTITY_LIST:  >> NUMBER, [UNIQUE_ID][0..NUMBER]
- *
- *  REQUEST_CREATE:      >> CLASS_ID
- *                       << [Sync Info]
- *  REQUEST_REMOVE:      >> UNIQUE_ID
- *                       << [Sync Info]
- *
- *  //REQUEST_CREATE_LIST: NUMBER, [CLASS_ID][0..NUMBER]
- *  //REQUEST_CREATE_LIST: NUMBER, [UNIQUE_ID][0..NUMBER]
- *
- *  REQUEST_ENTITY_LIST: //request the whole world :D
- *  YOU_ARE_ENTITY:      >> UNIQUE_ID
- *
- *  REQUEST_PNODE_PATH   >> UNIQUE_ID_START   UNIQUE_ID_STOP
- *                       << UNIQUE_ID_1   UNIQUE_ID_2   UNIQUE_ID_3 ...   UNIQUE_ID_N
- *
- *  SEND_PNODE_PATH      >> UNIQUE_ID_START   UNIQUE_ID_STOP NUMBER [UNIQUE_ID][0..NUMBER]
- */
 
 typedef enum NetworkGameManagerProtocol {
@@ -98,4 +73,6 @@
   private:
     NetworkGameManager();
+    
+    static bool youAreHandler(MessageId messageId, byte * data, int dataLength, void * someData, int userId );
 
 
Index: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 7684)
+++ branches/network/src/lib/network/network_stream.cc	(revision 7693)
@@ -569,12 +569,15 @@
  * @todo create playable for new user
  */
+#include "world_entities/space_ships/space_ship.h"
 void NetworkStream::handleNewClient( int userId )
 {
   MessageManager::getInstance()->initUser( userId );
-}
-
-
-
-
-
-
+  
+  networkGameManager->signalNewPlayer( userId );
+}
+
+
+
+
+
+
