Index: /branches/proxy/src/defs/class_id.h
===================================================================
--- /branches/proxy/src/defs/class_id.h	(revision 9395)
+++ /branches/proxy/src/defs/class_id.h	(revision 9396)
@@ -127,5 +127,5 @@
   CL_NETWORK_MANAGER            =    0x00000050,
   CL_SHARED_NETWORK_DATA        =    0x00000051,
-  CL_PROXY_SETTINGS             =    0x00000052,
+  CL_NETWORK_SETTINGS           =    0x00000052,
   CL_ATMOSPHERIC_ENGINE         =    0x00000061,
 
Index: /branches/proxy/src/defs/globals.h
===================================================================
--- /branches/proxy/src/defs/globals.h	(revision 9395)
+++ /branches/proxy/src/defs/globals.h	(revision 9396)
@@ -47,4 +47,5 @@
 
 #define   CONFIG_NAME_FULLSCREEN           "Fullscreen-mode"
+#define   CONFIG_NAME_NO_RENDER            "Norender-mode"
 #define   CONFIG_NAME_RESOLUTION           "Resolution"
 #define   CONFIG_NAME_WIREFRAME            "WireFrame-mode"
Index: /branches/proxy/src/lib/graphics/graphics_engine.cc
===================================================================
--- /branches/proxy/src/lib/graphics/graphics_engine.cc	(revision 9395)
+++ /branches/proxy/src/lib/graphics/graphics_engine.cc	(revision 9396)
@@ -66,4 +66,5 @@
   this->bDisplayFPS = false;
   this->bAntialiasing = false;
+  this->bDedicated = false;
   this->minFPS = 9999;
   this->maxFPS = 0;
@@ -163,4 +164,8 @@
   MultiType textures = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO_ADVANCED, CONFIG_NAME_TEXTURES, "1");
   Texture::setTextureEnableState(textures.getBool());
+
+  // check it is a dedicated network node: so no drawings are made
+  MultiType dedicated = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_NO_RENDER, "0");
+  this->bDedicated = dedicated.getBool();
 
   // searching for a usefull resolution
@@ -603,9 +608,10 @@
 }
 
+/**
+ * this draws the graphics engines graphics effecs
+ */
 void GraphicsEngine::draw() const
 {
-  //  LightManager::getInstance()->draw();
-
-  if (this->graphicsEffects != NULL)
+  if( this->graphicsEffects != NULL)
   {
     //draw the graphics effects
Index: /branches/proxy/src/lib/graphics/graphics_engine.h
===================================================================
--- /branches/proxy/src/lib/graphics/graphics_engine.h	(revision 9395)
+++ /branches/proxy/src/lib/graphics/graphics_engine.h	(revision 9396)
@@ -46,4 +46,5 @@
     void toggleFullscreen();
     static void setBackgroundColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha = 1.0);
+    inline bool isDedicated() { return this->bDedicated; }
 
     inline void setAntialiasing(bool flag) { this->bAntialiasing = flag; }
@@ -114,4 +115,5 @@
     bool                       particlesEnabled;   //!< If particles should be enabled.
     bool                       bAntialiasing;      //!< true if antialiasing enabled
+    bool                       bDedicated;         //!< true if this server is a dedicated server and should not render the scene
 
     int                        particlesValue;     //!< How many particles
Index: /branches/proxy/src/lib/gui/qt/gui_video.cc
===================================================================
--- /branches/proxy/src/lib/gui/qt/gui_video.cc	(revision 9395)
+++ /branches/proxy/src/lib/gui/qt/gui_video.cc	(revision 9396)
@@ -50,11 +50,15 @@
       layout->addWidget(fullscreen, 0, 0);
 
+      QtGuiCheckBox* dedicated = new QtGuiCheckBox(CONFIG_NAME_NO_RENDER, this, false);
+      //fullscreen->setName();
+      layout->addWidget(dedicated, 1, 0);
+
       QtGuiCheckBox* wireframe = new QtGuiCheckBox(CONFIG_NAME_WIREFRAME, this, false);
-      layout->addWidget(wireframe, 1, 0);
+      layout->addWidget(wireframe, 2, 0);
 
       {
         QComboBox* resolution = new QtGuiComboBox(CONFIG_NAME_RESOLUTION, this, "640x480");
         resolution->setEditable(true);
-        layout->addWidget(resolution, 2, 0);
+        layout->addWidget(resolution, 3, 0);
         std::vector<QString> resolutions;
         this->getResolutions(resolutions);
Index: /branches/proxy/src/lib/network/Makefile.am
===================================================================
--- /branches/proxy/src/lib/network/Makefile.am	(revision 9395)
+++ /branches/proxy/src/lib/network/Makefile.am	(revision 9396)
@@ -26,7 +26,7 @@
 		      udp_broadcast.cc \
 		      \
-		      proxy/proxy_settings.cc \
+		      proxy/network_settings.cc \
 		      \
-      		      monitor/connection_monitor.cc \
+				  monitor/connection_monitor.cc \
 		      monitor/network_monitor.cc \
 		      monitor/network_node.cc \
@@ -75,5 +75,5 @@
 		udp_broadcast.h \
 		\
-		proxy/proxy_settings.cc \
+		proxy/network_settings.cc \
 		\
                 monitor/connection_monitor.h \
Index: anches/proxy/src/lib/network/README
===================================================================
--- /branches/proxy/src/lib/network/README	(revision 9395)
+++ 	(revision )
@@ -1,16 +1,0 @@
-
-
-Hi people
-
-Before starting your implementation, please have a look at the 
-./network_monitor.cc
-./network_monitor.h
-files. They are well commented and include everything you will have 
-to use.
-
-For network module information, check out:
-https://www.orxonox.net/cgi-bin/trac.cgi/wiki/NetworkManager
-
-
-
-
Index: /branches/proxy/src/lib/network/README.NETWORK
===================================================================
--- /branches/proxy/src/lib/network/README.NETWORK	(revision 9396)
+++ /branches/proxy/src/lib/network/README.NETWORK	(revision 9396)
@@ -0,0 +1,12 @@
+
+
+This readme just gives some hints for the general network programming:
+
+UserId:
+containing the id of a user (==client). This id must be unique within a orxonox network its used especialy in the NetworkStream for node identification and also in the Synchronizeable base class for permissions checking (PERMISSION_OWNER)
+WARNING:
+There is some correlation between userids and the maxplayer, do not touch this.
+
+
+NetworkStream PeerInfo list: (peers)
+The network node with the offset 0 is always the server to which the client must connect to (in case there are connections to other hosts at the same time).
Index: /branches/proxy/src/lib/network/converter.cc
===================================================================
--- /branches/proxy/src/lib/network/converter.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/converter.cc	(revision 9396)
@@ -10,6 +10,6 @@
 
 ### File Specific:
-   main-programmer: Benjamin Wuest
-   co-programmer: ...
+   main-programmer: Benjamin Wuest (bwuest@ee.ethz.ch)
+   co-programmer: Christoph Renner (rennerc@ee.ethz.ch)
 */
 
@@ -38,5 +38,4 @@
 {
   /* set the class id for the base object */
-  //this->setClassID(CL_ENTITY_MANAGER, "EntityManager");
 }
 
Index: /branches/proxy/src/lib/network/handshake.cc
===================================================================
--- /branches/proxy/src/lib/network/handshake.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/handshake.cc	(revision 9396)
@@ -31,4 +31,5 @@
   /* set the class id for the base object */
   this->setClassID(CL_HANDSHAKE, "Handshake");
+
 
   // register all variable handlers
Index: /branches/proxy/src/lib/network/handshake.h
===================================================================
--- /branches/proxy/src/lib/network/handshake.h	(revision 9395)
+++ /branches/proxy/src/lib/network/handshake.h	(revision 9396)
@@ -80,12 +80,12 @@
     inline bool redirect() { return this->redirectProxy;}
     /** @param flag: indicating if the client should be redirected */
-    inline void setRedirect(bool flag) { this->redirectProxy = (int)flag; }
+    inline void setRedirect(bool flag) { if( SharedNetworkData::getInstance()->isClient()) return; this->redirectProxy = (int)flag; }
 
     /** @param address: the address of the proxy server 1 if any */
-    inline void setProxy1Address(IP address) { if( !SharedNetworkData::getInstance()->isMasterServer()) return; this->proxy1 = address; }
+    inline void setProxy1Address(IP address) { if( SharedNetworkData::getInstance()->isClient()) return; this->proxy1 = address; }
     /** @returns the address of the proxy server 1 if any */
     inline IP getProxy1Address() { return this->proxy1; }
     /** @param address: the address of the proxy server 2 if any */
-    inline void setProxy2Address(IP address) { this->proxy2 = address; }
+    inline void setProxy2Address(IP address) { if( SharedNetworkData::getInstance()->isClient()) return; this->proxy2 = address; }
     /** @returns the address of the proxy server 2 if any */
     inline IP getProxy2Address() { return this->proxy2; }
Index: /branches/proxy/src/lib/network/monitor/network_monitor.cc
===================================================================
--- /branches/proxy/src/lib/network/monitor/network_monitor.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/monitor/network_monitor.cc	(revision 9396)
@@ -19,5 +19,5 @@
 #include "debug.h"
 
-#include "proxy/proxy_settings.h"
+#include "proxy/network_settings.h"
 #include "shared_network_data.h"
 
@@ -57,5 +57,5 @@
   {
     // assuming that the config files are already read we get the proxy servers
-    std::vector<IPaddress*>* proxyList = ProxySettings::getInstance()->getProxyList();
+    std::vector<IPaddress*>* proxyList = NetworkSettings::getInstance()->getProxyList();
     std::vector<IPaddress*>::iterator it = proxyList->begin();
     // create a peer info class and a network node class for each new proxy and add them to the passive list
Index: /branches/proxy/src/lib/network/monitor/network_monitor.h
===================================================================
--- /branches/proxy/src/lib/network/monitor/network_monitor.h	(revision 9395)
+++ /branches/proxy/src/lib/network/monitor/network_monitor.h	(revision 9396)
@@ -55,4 +55,10 @@
     inline void removeMasterServer(NetworkNode* node, PeerInfo* pInfo) { node->removeMasterServer(pInfo); }
 
+    PeerInfo* getFirstChoiceProxy();
+    PeerInfo* getSecondChoiceProxy();
+
+    /** @returns the active proxy server list of the localnode */
+    inline std::list<PeerInfo*> getActiveProxyServer() { return this->localNode->getActiveProxyServer(); }
+
     /* slots admin and info interface */
     /** @returns the total number of players in this game (including all proxy servers etc)*/
@@ -63,6 +69,5 @@
     /** @param node node to be checked for slots @returns true if there are still free network slots available at this node */
     inline bool gotFreeSlots(NetworkNode* node) { return (node->getPlayerNumber() < SharedNetworkData::getInstance()->getMaxPlayer())?true:false; }
-    PeerInfo* getFirstChoiceProxy();
-    PeerInfo* getSecondChoiceProxy();
+
     /** @returns true if the next client should be reconnected to some other proxy server with more connections */
     inline bool isReconnectNextClient() { return (this->localNode->getPlayerNumber() >= SharedNetworkData::getInstance()->getMaxPlayer())?true:false; }
Index: /branches/proxy/src/lib/network/monitor/network_node.h
===================================================================
--- /branches/proxy/src/lib/network/monitor/network_node.h	(revision 9395)
+++ /branches/proxy/src/lib/network/monitor/network_node.h	(revision 9396)
@@ -37,4 +37,14 @@
     PeerInfo* getMasterServer(int index);
 
+    /** @returns the master server list */
+    inline std::list<PeerInfo*> getMasterServer() { return this->masterServerList; }
+    /** @returns the active proxy server list */
+    inline std::list<PeerInfo*> getActiveProxyServer() { return this->activeProxyServerList; }
+    /** @returns the passive proxy server list */
+    inline std::list<PeerInfo*> getPassiveProxyServer() { return this->passiveProxyServerList; }
+    /** @returns the client list */
+    inline std::list<PeerInfo*> getClient() { return this->clientList; }
+
+
     /** @returns the number of players */
     inline int getPlayerNumber() { return this->playerNumber; }
Index: /branches/proxy/src/lib/network/network_game_manager.cc
===================================================================
--- /branches/proxy/src/lib/network/network_game_manager.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/network_game_manager.cc	(revision 9396)
@@ -91,5 +91,5 @@
 bool NetworkGameManager::signalNewPlayer( int userId )
 {
-  assert( SharedNetworkData::getInstance()->isMasterServer() );
+  assert( SharedNetworkData::getInstance()->isMasterServer() ||  SharedNetworkData::getInstance()->isProxyServer());
   assert( State::getGameRules() );
   assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) );
@@ -168,5 +168,5 @@
 bool NetworkGameManager::delSynchronizeableHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
 {
-  if ( SharedNetworkData::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isMasterServer() ||  SharedNetworkData::getInstance()->isProxyServer())
   {
     PRINTF(2)("Recieved DeleteSynchronizeable message from client %d!\n", userId);
@@ -229,5 +229,5 @@
 bool NetworkGameManager::preferedTeamHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
 {
-  assert( SharedNetworkData::getInstance()->isMasterServer() );
+  assert( SharedNetworkData::getInstance()->isMasterServer() ||  SharedNetworkData::getInstance()->isProxyServer());
 
   int teamId = 0;
@@ -261,5 +261,5 @@
 void NetworkGameManager::prefereTeam( int teamId )
 {
-  if ( SharedNetworkData::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
     setPreferedTeam( SharedNetworkData::getInstance()->getHostID(), teamId );
   else
@@ -305,5 +305,5 @@
 {
   PRINTF(0)("NetworkGameManager::chatMessageHandler %d %d\n", userId, SharedNetworkData::getInstance()->getHostID() );
-  if ( SharedNetworkData::getInstance()->isMasterServer() && userId !=  SharedNetworkData::getInstance()->getHostID() )
+  if ( (SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer()) && userId !=  SharedNetworkData::getInstance()->getHostID() )
   {
     MessageManager::getInstance()->sendMessage( messageId, data, dataLength, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
@@ -347,5 +347,5 @@
   assert( Converter::stringToByteArray(message, buf+2*INTSIZE, message.length()+INTSIZE) == message.length()+INTSIZE );
 
-  if ( SharedNetworkData::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
     MessageManager::getInstance()->sendMessage( MSGID_CHATMESSAGE, buf, message.length()+3*INTSIZE, RT_ALL_ME, 0, MP_HIGHBANDWIDTH );
   else
Index: /branches/proxy/src/lib/network/network_manager.cc
===================================================================
--- /branches/proxy/src/lib/network/network_manager.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/network_manager.cc	(revision 9396)
@@ -10,6 +10,6 @@
 
    ### File Specific:
-   main-programmer: Patrick Boenzli
-   co-programmer: ...
+   main-programmer: Patrick Boenzli (patrick@orxonox.ethz.ch)
+   co-programmer: Christoph Renner (rennerc@ee.ethz.ch)
 */
 
@@ -98,13 +98,69 @@
 
 
+
+/**
+ *  creates a new NetworkStream of server type
+ * @param port: number of the TCP port
+ */
+int NetworkManager::createMasterServer(unsigned int port)
+{
+  // init the proxy settings data do this before everything else is done here
+  NetworkSettings::getInstance()->loadData();
+
+  // create the network stream
+  this->networkStream = new NetworkStream(NET_MASTER_SERVER);
+  this->networkStream->createServer( port);
+
+  // start the network game manager
+  this->networkStream->createNetworkGameManager();
+
+  PRINTF(0)("Created Network Master Server\n");
+  SDL_Delay(20);
+  return 1;
+}
+
+/**
+ *  creates a new network stream of proxy server type
+ * @param port: number of the TCP port
+ */
+int NetworkManager::createProxyServer(unsigned int port)
+{
+  // init the proxy settings data do this before everything else is done here
+  NetworkSettings::getInstance()->loadData();
+
+  // create the network stream
+  this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE);
+  this->networkStream->createServer( port);
+  // and connect to the master server for synchronization
+//   this->networkStream->connectToMasterServer(NetworkSettings::getInstance()->getMasterAddr());
+  // and to the other proxy servers
+
+
+
+  // start the network game manager
+  this->networkStream->createNetworkGameManager();
+
+
+  PRINTF(0)("Created Network Proxy Server\n");
+  SDL_Delay(20);
+  return 1;
+}
+
+
 /**
  *  creates a connection from one object to a host
  * @param hostName: the name of the destination host
  */
-int NetworkManager::establishConnection(const std::string & name, unsigned int port)
-{
-  this->networkStream = new NetworkStream( name, port );
-  SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
+int NetworkManager::createClient(const std::string & name, unsigned int port)
+{
+  // create the network stream
+  this->networkStream = new NetworkStream(NET_CLIENT);
+  // connect to the master server, if a redirection should occure, this is handled in the NetworkStream itself
+  this->networkStream->connectToMasterServer( name, port);
+
+  // and start the handshake
   this->networkStream->startHandshake();
+
+  PRINTF(0)("Created Network Client");
   return 1;
 }
@@ -112,20 +168,7 @@
 
 /**
- *  creates a new NetworkStream of server type
- * @param port: number of the TCP port
- */
-int NetworkManager::createServer(unsigned int port)
-{
-  SharedNetworkData::getInstance()->setHostID(0);
-  SharedNetworkData::getInstance()->setNodeType(NET_MASTER_SERVER);
-  this->networkStream = new NetworkStream(port);
-  SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
-  this->networkStream->createNetworkGameManager();
-  PRINTF(0)("CREATE SERVER\n");
-  SDL_Delay(20);
-  return 1;
-}
-
-
+ * connects a synchronizeable to the network stream
+ * @param sync: synchronizeable to connect
+ */
 void NetworkManager::connectSynchronizeable(Synchronizeable& sync)
 {
@@ -144,7 +187,8 @@
   if( likely(this->elapsedTime < 1.0f / NETWORK_FREQUENCY))
     return;
+
   this->elapsedTime = 0.0f;
 
-  if ( networkStream )
+  if ( this->networkStream )
     networkStream->processData();
 
Index: /branches/proxy/src/lib/network/network_manager.h
===================================================================
--- /branches/proxy/src/lib/network/network_manager.h	(revision 9395)
+++ /branches/proxy/src/lib/network/network_manager.h	(revision 9396)
@@ -36,13 +36,7 @@
     void shutdown();
 
-    int establishConnection( const std::string & name, unsigned int port);
-    int createServer(unsigned int port);
-
-    /** Returns the hostID @return The hostID of the object */
-    inline int getHostID() { return SharedNetworkData::getInstance()->getHostID(); }
-    inline bool isMasterServer() { return SharedNetworkData::getInstance()->isMasterServer(); }
-    inline bool isProxyServer() { return SharedNetworkData::getInstance()->isProxyServer(); }
-    inline bool isClient() { return SharedNetworkData::getInstance()->isClient(); }
-
+    int createClient( const std::string & name, unsigned int port);
+    int createMasterServer( unsigned int port);
+    int createProxyServer( unsigned int port);
 
     void connectSynchronizeable(Synchronizeable& sync);
@@ -58,5 +52,5 @@
   private:
     static NetworkManager*           singletonRef;            //!< Pointer to the only instance of this Class
-    NetworkStream*                   networkStream;       //!< pointer to network stream
+    NetworkStream*                   networkStream;           //!< pointer to network stream
 
     float                            elapsedTime;             //!< elapsed time since the last network update
Index: /branches/proxy/src/lib/network/network_stream.cc
===================================================================
--- /branches/proxy/src/lib/network/network_stream.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/network_stream.cc	(revision 9396)
@@ -70,41 +70,41 @@
 
 
-/**
- * start as a client, connect to a server
- *  @param host: host name (address)
- *  @param port: port number
- */
-NetworkStream::NetworkStream( std::string host, int port )
+NetworkStream::NetworkStream( int nodeType)
 {
   this->init();
-  // init the peers[0] the server to ceonnect to
-  this->peers[0].socket = new UdpSocket( host, port );
-  this->peers[0].userId = 0;
-  this->peers[0].nodeType = NET_MASTER_SERVER;
-  this->peers[0].connectionMonitor = new ConnectionMonitor( 0 );
-  this->peers[0].ip = this->peers[0].socket->getRemoteAddress();
-  // and set also the localhost
-  this->pInfo->nodeType = NET_CLIENT;
+
+  this->pInfo->nodeType = nodeType;
+
+  switch( nodeType)
+  {
+    case NET_MASTER_SERVER:
+      // init the shared network data
+      SharedNetworkData::getInstance()->setHostID(0);
+      SharedNetworkData::getInstance()->setNodeType(NET_MASTER_SERVER);
+      break;
+
+    case NET_PROXY_SERVER_ACTIVE:
+      // init the shared network data
+      SharedNetworkData::getInstance()->setHostID(0);
+      SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_ACTIVE);
+      break;
+    case NET_PROXY_SERVER_PASSIVE:
+            // init the shared network data
+      SharedNetworkData::getInstance()->setHostID(0);
+      SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_PASSIVE);
+      break;
+    case NET_CLIENT:
+      SharedNetworkData::getInstance()->setNodeType(NET_CLIENT);
+      break;
+  }
+
+  SharedNetworkData::getInstance()->setDefaultSyncStream(this);
+
   // get the local ip address
   IPaddress ip;
-  SDLNet_ResolveHost( &ip, NULL, port );
+  SDLNet_ResolveHost( &ip, NULL, 0);
   this->pInfo->ip = ip;
 }
 
-
-/**
- * start as a server
- *  @param port: at this port
- */
-NetworkStream::NetworkStream( int port )
-{
-  this->init();
-  this->serverSocket = new UdpServerSocket(port);
-  this->pInfo->nodeType = NET_MASTER_SERVER;
-  // get the local ip address
-  IPaddress ip;
-  SDLNet_ResolveHost( &ip, NULL, port );
-  this->pInfo->ip = ip;
-}
 
 
@@ -182,4 +182,48 @@
 
 /**
+ * establish a connection to a remote master server
+ * @param host: host name
+ * @param port: the port number
+ */
+void NetworkStream::connectToMasterServer(std::string host, int port)
+{
+  int node = this->peers.size();
+  this->peers[node].socket = new UdpSocket( host, port );
+  this->peers[node].userId = 0;
+
+  this->peers[node].nodeType = NET_MASTER_SERVER;
+  this->peers[node].connectionMonitor = new ConnectionMonitor( 0 );
+  this->peers[node].ip = this->peers[node].socket->getRemoteAddress();
+}
+
+
+/**
+ * establish a connection to a remote proxy server
+ * @param host: host name
+ * @param port: the port number
+ */
+void NetworkStream::connectToProxyServer(std::string host, int port)
+{
+  int node = this->peers.size();
+  this->peers[node].socket = new UdpSocket( host, port );
+  this->peers[node].userId = 0;
+
+  this->peers[node].nodeType = NET_PROXY_SERVER_ACTIVE;
+  this->peers[node].connectionMonitor = new ConnectionMonitor( 0 );
+  this->peers[node].ip = this->peers[node].socket->getRemoteAddress();
+}
+
+
+/**
+ * create a server
+ * @param port: interface port for all clients
+ */
+void NetworkStream::createServer(int port)
+{
+  this->serverSocket = new UdpServerSocket(port);
+}
+
+
+/**
  * creates a new instance of the network game manager
  */
@@ -187,6 +231,5 @@
 {
   this->networkGameManager = NetworkGameManager::getInstance();
-  // setUniqueID( maxCon+2 ) because we need one id for every handshake
-  // and one for handshake to reject client maxCon+1
+
   this->networkGameManager->setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
   MessageManager::getInstance()->setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
@@ -260,5 +303,5 @@
   }
 
-  if ( this->pInfo->nodeType == NET_MASTER_SERVER )
+  if ( this->pInfo->isMasterServer())
   {
     // execute everytthing the master server shoudl do
@@ -268,7 +311,11 @@
     this->updateConnectionList();
   }
-  else if( this->pInfo->nodeType == NET_PROXY_SERVER_ACTIVE)
+  else if( this->pInfo->isProxyServer())
   {
     // execute everything the proxy server should do
+    if ( serverSocket )
+      serverSocket->update();
+
+    this->updateConnectionList();
   }
   else
@@ -442,8 +489,13 @@
 void NetworkStream::debug()
 {
-  if( this->isMasterServer())
-    PRINT(0)(" Host ist Server with ID: %i\n", this->pInfo->userId);
-  else
+  if( SharedNetworkData::getInstance()->isMasterServer()) {
+    PRINT(0)(" Host ist Master Server with ID: %i\n", this->pInfo->userId);
+  }
+  else if( SharedNetworkData::getInstance()->isProxyServer()) {
+    PRINT(0)(" Host ist Proxy Server with ID: %i\n", this->pInfo->userId);
+  }
+  else {
     PRINT(0)(" Host ist Client with ID: %i\n", this->pInfo->userId);
+  }
 
   PRINT(0)(" Got %i connected Synchronizeables, showing active Syncs:\n", this->synchronizeables.size());
@@ -493,7 +545,6 @@
           {
 
-            if ( this->pInfo->nodeType == NET_CLIENT )
+            if ( this->pInfo->isClient() )
             {
-
               SharedNetworkData::getInstance()->setHostID( it->second.handshake->getHostId() );
               this->pInfo->userId = SharedNetworkData::getInstance()->getHostID();
@@ -528,5 +579,20 @@
             if ( it->second.handshake->canDel() )
             {
-              if ( this->pInfo->nodeType == NET_MASTER_SERVER )
+
+              if ( this->pInfo->isMasterServer() )
+              {
+                it->second.nodeType = it->second.handshake->getRemoteNodeType();
+                it->second.ip = it->second.socket->getRemoteAddress();
+
+                this->networkMonitor->addNode(&it->second);
+
+                this->handleNewClient( it->second.userId );
+
+                if ( PlayerStats::getStats( it->second.userId ) && it->second.handshake->getPreferedNickName() != "" )
+                {
+                  PlayerStats::getStats( it->second.userId )->setNickName( it->second.handshake->getPreferedNickName() );
+                }
+              }
+              else if ( this->pInfo->isProxyServer() )
               {
                 it->second.nodeType = it->second.handshake->getRemoteNodeType();
@@ -639,6 +705,6 @@
         continue;
 
-      // if we are a server and this is not our handshake
-      if ( isMasterServer() && sync.getLeafClassID() == CL_HANDSHAKE && sync.getUniqueID() != peer->second.userId )
+      // if we are a server (both master and proxy servers) and this is not our handshake
+      if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() ) && sync.getLeafClassID() == CL_HANDSHAKE && sync.getUniqueID() != peer->second.userId )
         continue;
 
@@ -654,5 +720,5 @@
 
       // server fakes uniqueid == 0 for handshake
-      if ( this->isMasterServer() && sync.getUniqueID() < SharedNetworkData::getInstance()->getMaxPlayer() - 1 )
+      if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() ) && sync.getUniqueID() < SharedNetworkData::getInstance()->getMaxPlayer() - 1 )
         n = Converter::intToByteArray( 0, buf + offset, UDP_PACKET_SIZE - offset );
       else
@@ -703,5 +769,5 @@
     // now compress the data with the zip library
     int compLength = 0;
-    if ( this->isMasterServer() )
+    if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
       compLength = Zip::getInstance()->zip( buf, offset, compBuf, UDP_PACKET_SIZE, dictServer );
     else
@@ -783,5 +849,5 @@
       }
 
-      while ( offset + 2*INTSIZE < length )
+      while ( offset + 2 * INTSIZE < length )
       {
         assert( offset > 0 );
@@ -797,4 +863,5 @@
         Synchronizeable * sync = NULL;
 
+        // look for the synchronizeable in question
         for ( SynchronizeableList::iterator it = synchronizeables.begin(); it != synchronizeables.end(); it++ )
         {
@@ -807,7 +874,10 @@
         }
 
+        // this synchronizeable does not yet exist! create it
         if ( sync == NULL )
         {
           PRINTF(0)("could not find sync with id %d. try to create it\n", uniqueId);
+
+          // if it is an old synchronizeable already removed, ignore it
           if ( oldSynchronizeables.find( uniqueId ) != oldSynchronizeables.end() )
           {
@@ -816,5 +886,6 @@
           }
 
-          if ( !peers[peer->second.userId].isMasterServer() )
+          // if the node we got this unknown sync from is a client we ignore it (since it has no rights to create a new sync)
+          if ( peers[peer->second.userId].isClient() )
           {
             offset += syncDataLength;
@@ -833,4 +904,5 @@
           assert( leafClassId != 0 );
 
+
           BaseObject * b = NULL;
           /* These are some small exeptions in creation: Not all objects can/should be created via Factory */
@@ -838,5 +910,5 @@
           if( leafClassId == CL_NULL_PARENT || leafClassId == CL_SYNCHRONIZEABLE || leafClassId == CL_NETWORK_GAME_MANAGER )
           {
-            PRINTF(1)("Can not create Class with ID %x!\n", (int)leafClassId);
+            PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId);
             offset += syncDataLength;
             continue;
@@ -913,7 +985,4 @@
   // do all game relevant stuff here
   networkGameManager->signalNewPlayer( userId );
-
-  // register the new client at the network monitor
-//   this->networkMonitor->addClient();
 }
 
Index: /branches/proxy/src/lib/network/network_stream.h
===================================================================
--- /branches/proxy/src/lib/network/network_stream.h	(revision 9395)
+++ /branches/proxy/src/lib/network/network_stream.h	(revision 9396)
@@ -36,9 +36,12 @@
   public:
     NetworkStream();
-    NetworkStream( std::string host, int port);
-    NetworkStream( int port );
+    NetworkStream(int nodeType);
+    virtual ~NetworkStream();
 
-    virtual ~NetworkStream();
     void init();
+
+    void connectToMasterServer(std::string host, int port);
+    void connectToProxyServer(std::string host, int port);
+    void createServer(int port);
 
     void createNetworkGameManager();
@@ -49,9 +52,4 @@
     void disconnectSynchronizeable(Synchronizeable& sync);
 
-    /* functions for the localhost settings */
-    inline bool isMasterServer() const { return (this->pInfo->nodeType == NET_MASTER_SERVER)? true:false; }
-    inline bool isProxyServer() const { return (this->pInfo->nodeType == NET_PROXY_SERVER_ACTIVE)? true:false; }
-    inline bool isClient() const { return (this->pInfo->nodeType == NET_CLIENT)? true:false; }
-//     inline bool isActive() const { return this->bActive; }
     inline int getMaxConnections(){ return SharedNetworkData::getInstance()->getMaxPlayer(); }
 
Index: /branches/proxy/src/lib/network/peer_info.h
===================================================================
--- /branches/proxy/src/lib/network/peer_info.h	(revision 9395)
+++ /branches/proxy/src/lib/network/peer_info.h	(revision 9396)
@@ -24,4 +24,5 @@
     inline bool isMasterServer() { return this->nodeType == NET_MASTER_SERVER; }
     inline bool isProxyServer() { return this->nodeType == NET_PROXY_SERVER_ACTIVE; }
+    inline bool isProxyServerPassive() { return this->nodeType == NET_PROXY_SERVER_PASSIVE; }
     inline bool isClient() { return this->nodeType == NET_CLIENT; }
 
@@ -30,14 +31,14 @@
 
   public:
-    int                 userId;
-    int                 nodeType;
-    IP                  ip;
+    int                 userId;                  //!< id of this network node
+    int                 nodeType;                //!< type of this network node
+    IP                  ip;                      //!> the ip address of this network node
 
-    NetworkSocket *     socket;
-    Handshake *         handshake;
-    ConnectionMonitor * connectionMonitor;
+    NetworkSocket *     socket;                  //!< socket connecting to this node
+    Handshake *         handshake;               //!< the handshake object, active on connection setup
+    ConnectionMonitor * connectionMonitor;       //!< ConnectionMonitor monitoring the current network traffic
 
-    int                 lastAckedState;
-    int                 lastRecvedState;
+    int                 lastAckedState;          //!< last acked state synchronized state
+    int                 lastRecvedState;         //!< last received state
 };
 
Index: /branches/proxy/src/lib/network/player_stats.cc
===================================================================
--- /branches/proxy/src/lib/network/player_stats.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/player_stats.cc	(revision 9396)
@@ -191,5 +191,5 @@
 void PlayerStats::setNickName( std::string nick )
 {
-  if ( SharedNetworkData::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() )
   {
     this->nickName = nick;
Index: /branches/proxy/src/lib/network/proxy/network_settings.cc
===================================================================
--- /branches/proxy/src/lib/network/proxy/network_settings.cc	(revision 9396)
+++ /branches/proxy/src/lib/network/proxy/network_settings.cc	(revision 9396)
@@ -0,0 +1,139 @@
+/*
+   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: Patrick Boenzli
+*/
+
+
+#define DEBUG_MODULE_NETWORK
+
+#include "network_settings.h"
+#include "netdefs.h"
+
+#include "loading/resource_manager.h"
+#include "loading/load_param.h"
+
+#include "debug.h"
+
+
+
+NetworkSettings* NetworkSettings::singletonRef = NULL;
+
+/**
+ * Standard constructor
+ */
+NetworkSettings::NetworkSettings()
+{
+  /* set the class id for the base object */
+  this->setClassID(CL_NETWORK_SETTINGS, "NetworkSettings");
+
+  // suggest a good standard max players value
+  this->maxPlayer = 10;
+}
+
+
+/**
+ * Standard destructor
+ */
+NetworkSettings::~NetworkSettings()
+{
+  NetworkSettings::singletonRef = NULL;
+
+  // remove all unused proxy data again
+  for( int i = 0; i < this->proxies.size(); i++)
+  {
+    IPaddress* ip = this->proxies.back();
+    this->proxies.pop_back();
+    delete ip;
+  }
+}
+
+
+/**
+ *  this loads the proxy settings from a configuration file
+ */
+void NetworkSettings::loadData()
+{
+  std::string fileName = ResourceManager::getInstance()->getDataDir();
+  fileName += "configs/network_settings.conf";
+
+  TiXmlDocument doc(fileName);
+  if( !doc.LoadFile(fileName))
+  {
+    PRINTF(1)("Loading file %s failed for Network Settings.\n", fileName.c_str());
+    return;
+  }
+  const TiXmlElement* root = doc.RootElement();
+
+  if( strcmp( root->Value(), "NetworkSettings"))
+  {
+    // report an error
+    PRINTF(1)("Specified XML File is not an orxonox Network Settings file (NetworkSettings element missing)\n");
+    return;
+  }
+
+  this->loadNetworkSettings( root);
+}
+
+
+
+/**
+ * load the proxy settings
+ * @param root: the root element of the xml elemnts
+ */
+void NetworkSettings::loadNetworkSettings(const TiXmlElement* root)
+{
+  LoadParam(root, "master-addr", this, NetworkSettings, setMasterAddr);
+
+  LoadParam(root, "max-player", this, NetworkSettings, setMaxPlayer);
+
+  LOAD_PARAM_START_CYCLE(root, element);
+  {
+    element->ToText();
+    LoadParam(root, "proxy-addr", this, NetworkSettings, setProxyAddr);
+  }
+  LOAD_PARAM_END_CYCLE(element);
+
+}
+
+
+/**
+ * sets the master server address
+ * @param masterAddr: the address of the master server
+ */
+void NetworkSettings::setMasterAddr(const std::string& masterAddr)
+{
+  IPaddress *ip = new IPaddress;
+
+  SDLNet_ResolveHost( ip, masterAddr.c_str(), 9999 );
+
+  this->masterServer = *ip;
+}
+
+/**
+ * sets the proxy address to
+ *  @param proxyAddr: the proxy address
+ */
+void NetworkSettings::setProxyAddr(const std::string& proxyAddr)
+{
+  IPaddress *ip = new IPaddress;
+
+  SDLNet_ResolveHost( ip, proxyAddr.c_str(), 9999 );
+
+  this->proxies.push_back(ip);
+}
+
+
+
+
+
+
+
Index: /branches/proxy/src/lib/network/proxy/network_settings.h
===================================================================
--- /branches/proxy/src/lib/network/proxy/network_settings.h	(revision 9396)
+++ /branches/proxy/src/lib/network/proxy/network_settings.h	(revision 9396)
@@ -0,0 +1,64 @@
+/*!
+ * @file proxy_settings.h
+ *  some shared data from the proxy settings
+ */
+
+#ifndef _NETWORK_SETTINGS_H
+#define _NETWORK_SETTINGS_H
+
+#include "base_object.h"
+#include "netdefs.h"
+
+#include "debug.h"
+#include "ip.h"
+
+#include <vector>
+
+
+class NetworkStream;
+class Synchronizeable;
+class TiXmlElement;
+
+
+/* and here is the class itsself*/
+class NetworkSettings : public BaseObject
+{
+
+  public:
+    inline static NetworkSettings* getInstance() { if (!NetworkSettings::singletonRef) NetworkSettings::singletonRef = new NetworkSettings();
+      return NetworkSettings::singletonRef; }
+    virtual ~NetworkSettings();
+
+    void loadData();
+
+    void loadNetworkSettings(const TiXmlElement* root);
+
+    /** @param number: sets the max number of players */
+    inline void setMaxPlayer(int number) { this->maxPlayer = number; }
+    /** @returns teh max number of players */
+    int getMaxPlayer() { return this->maxPlayer; }
+
+    void setMasterAddr(const std::string& masterAddr);
+    /** @returns the address of the master server read from the network config file */
+    inline IP getMasterAddr() { return this->masterServer; }
+
+    void setProxyAddr(const std::string& proxyAddr);
+    /** @returns the list of proxy servers from the init file */
+    inline std::vector<IPaddress*>* getProxyList() { return &this->proxies; }
+
+
+  private:
+    NetworkSettings();
+
+
+  private:
+    static NetworkSettings*        singletonRef;            //!< Pointer to the only instance of this Class
+    int                          maxPlayer;               //!< maximal number of players
+    std::vector<IPaddress*>      proxies;                 //!< all registered proxies
+    IP                           masterServer;            //!< master server ip address
+
+};
+
+
+
+#endif /* _NETWORK_SETTINGS_H */
Index: anches/proxy/src/lib/network/proxy/proxy_settings.cc
===================================================================
--- /branches/proxy/src/lib/network/proxy/proxy_settings.cc	(revision 9395)
+++ 	(revision )
@@ -1,121 +1,0 @@
-/*
-   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: Patrick Boenzli
-*/
-
-
-#define DEBUG_MODULE_NETWORK
-
-#include "proxy_settings.h"
-#include "netdefs.h"
-
-#include "loading/resource_manager.h"
-#include "loading/load_param.h"
-
-#include "debug.h"
-
-
-
-ProxySettings* ProxySettings::singletonRef = NULL;
-
-/**
- * Standard constructor
- */
-ProxySettings::ProxySettings()
-{
-  /* set the class id for the base object */
-  this->setClassID(CL_PROXY_SETTINGS, "ProxySettings");
-
-  // suggest a good standard max players value
-  this->maxPlayer = 10;
-
-  PRINTF(0)("\n\n\n\n");
-
-  std::string fileName = ResourceManager::getInstance()->getDataDir();
-  fileName += "configs/proxy_settings.conf";
-
-
-  PRINTF(0)("trying file %s\n", fileName.c_str());
-  TiXmlDocument doc(fileName);
-  if( !doc.LoadFile(fileName))
-  {
-    PRINTF(0)("Loading file %s failed for Proxy Settings.\n", fileName.c_str());
-    return;
-  }
-  const TiXmlElement* root = doc.RootElement();
-
-  if( strcmp( root->Value(), "ProxySettings"))
-  {
-    // report an error
-    PRINTF(0)("Specified XML File is not an orxonox proxy settings file (ProxySettings element missing)\n");
-    return;
-  }
-  LoadParamXML(root, "ProxySettings", this, ProxySettings, loadProxySettings);
-}
-
-
-/**
- * Standard destructor
- */
-ProxySettings::~ProxySettings()
-{
-  ProxySettings::singletonRef = NULL;
-
-  // remove all unused proxy data again
-  for( int i = 0; i < this->proxies.size(); i++)
-  {
-    IPaddress* ip = this->proxies.back();
-    this->proxies.pop_back();
-    delete ip;
-  }
-}
-
-
-
-/**
- * load the proxy settings
- * @param root: the root element of the xml elemnts
- */
-void ProxySettings::loadProxySettings(const TiXmlElement* root)
-{
-  PRINTF(0)("lalalallalala\n\n");
-  LoadParam(root, "max-player", this, ProxySettings, setMaxPlayer);
-
-  LOAD_PARAM_START_CYCLE(root, element);
-  {
-    element->ToText();
-    LoadParam(root, "proxy-addr", this, ProxySettings, setProxyAddr);
-  }
-  LOAD_PARAM_END_CYCLE(element);
-
-}
-
-
-/**
- * sets the proxy address to
- *  @param proxyAddr: the proxy address
- */
-void ProxySettings::setProxyAddr(const std::string& proxyAddr)
-{
-  IPaddress *ip = new IPaddress;
-
-  SDLNet_ResolveHost( ip, proxyAddr.c_str(), 9999 );
-
-  this->proxies.push_back(ip);
-}
-
-
-
-
-
-
-
Index: anches/proxy/src/lib/network/proxy/proxy_settings.h
===================================================================
--- /branches/proxy/src/lib/network/proxy/proxy_settings.h	(revision 9395)
+++ 	(revision )
@@ -1,56 +1,0 @@
-/*!
- * @file proxy_settings.h
- *  some shared data from the proxy settings
- */
-
-#ifndef _PROXY_SETTINGS_H
-#define _PROXY_SETTINGS_H
-
-#include "base_object.h"
-#include "netdefs.h"
-
-#include "debug.h"
-
-#include <vector>
-
-
-class NetworkStream;
-class Synchronizeable;
-class TiXmlElement;
-
-
-/* and here is the class itsself*/
-class ProxySettings : public BaseObject
-{
-
-  public:
-    inline static ProxySettings* getInstance() { if (!ProxySettings::singletonRef) ProxySettings::singletonRef = new ProxySettings();
-      return ProxySettings::singletonRef; }
-    virtual ~ProxySettings();
-
-    void loadProxySettings(const TiXmlElement* root);
-
-    /** @param number: sets the max number of players */
-    inline void setMaxPlayer(int number) { this->maxPlayer = number; PRINTF(0)("maxplayers set to %i\n\n\n", number);}
-    /** @returns teh max number of players */
-    int getMaxPlayer() { return this->maxPlayer; }
-    void setProxyAddr(const std::string& proxyAddr);
-
-    /** @returns the list of proxy servers from the init file */
-    inline std::vector<IPaddress*>* getProxyList() { return &this->proxies; }
-
-
-  private:
-    ProxySettings();
-
-
-  private:
-    static ProxySettings*        singletonRef;            //!< Pointer to the only instance of this Class
-    int                          maxPlayer;               //!< maximal number of players
-    std::vector<IPaddress*>      proxies;                 //!< all registered proxies
-
-};
-
-
-
-#endif /* _PROXY_SETTINGS_H */
Index: /branches/proxy/src/lib/network/shared_network_data.cc
===================================================================
--- /branches/proxy/src/lib/network/shared_network_data.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/shared_network_data.cc	(revision 9396)
@@ -34,12 +34,11 @@
   this->setClassID(CL_SHARED_NETWORK_DATA, "SharedNetworkData");
 
+  this->nodeType = NET_CLIENT;
   this->hostID = -1;
   this->defaultSyncStream = NULL;
 
-//   if( State::isOnline())
-  this->newUniqueID = ProxySettings::getInstance()->getMaxPlayer() + 2;
-//   else
-//  this->newUniqueID = NET_MAX_CONNECTIONS + 2;
-  this->nodeType = NET_CLIENT;
+  // setUniqueID( maxCon+2 ) because we need one id for every handshake
+  // and one for handshake to reject client maxCon+1
+  this->newUniqueID = NetworkSettings::getInstance()->getMaxPlayer() + 2;
 }
 
Index: /branches/proxy/src/lib/network/shared_network_data.h
===================================================================
--- /branches/proxy/src/lib/network/shared_network_data.h	(revision 9395)
+++ /branches/proxy/src/lib/network/shared_network_data.h	(revision 9396)
@@ -9,5 +9,5 @@
 #include "base_object.h"
 #include "netdefs.h"
-#include "proxy/proxy_settings.h"
+#include "proxy/network_settings.h"
 
 //!< maximal connectinons for the server
@@ -40,5 +40,5 @@
 
     /** @returns the maximum number of players for this server */
-    inline int getMaxPlayer() { return ProxySettings::getInstance()->getMaxPlayer(); }
+    inline int getMaxPlayer() { return NetworkSettings::getInstance()->getMaxPlayer(); }
 
     /** @returns the hostID of the node */
Index: /branches/proxy/src/lib/network/synchronizeable.cc
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable.cc	(revision 9395)
+++ /branches/proxy/src/lib/network/synchronizeable.cc	(revision 9396)
@@ -11,6 +11,6 @@
 
 ### File Specific:
-   main-programmer: Silvan Nellen
-   co-programmer: Benjamin Wuest
+   main-programmer: Christoph Renner (rennerc@ee.ethz.ch)
+   co-programmer: Patrick Boenzli (patrick@orxonox.ethz.ch)
 */
 
@@ -72,5 +72,6 @@
     this->networkStream->disconnectSynchronizeable(*this);
 
-    if ( SharedNetworkData::getInstance()->isMasterServer() && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( CL_MESSAGE_MANAGER ) )
+    if ( (SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() )
+           && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( CL_MESSAGE_MANAGER ) )
       NetworkGameManager::getInstance()->removeSynchronizeable( this->getUniqueID() );
   }
@@ -112,4 +113,14 @@
 
 
+/**
+ * creates a diff image from two states
+ * @param userId: the userid of the user where the image will be sent to
+ * @param data: the binary data array to write to
+ * @param maxLength: maximal length of the data written (length of available space in the array)
+ * @param stateId: the state id that this diff will represent
+ * @param priorityTH: the priority threshold: all syncs below this threshold won't be synchronized
+ *
+ * @todo check for permissions
+ */
 int Synchronizeable::getStateDiff( int userId, byte* data, int maxLength, int stateId, int fromStateId, int priorityTH )
 {
@@ -189,5 +200,5 @@
   int n;
 
-  bool hasPermission;
+  bool hasPermission = false;
   bool sizeChanged = false;
 
@@ -195,10 +206,28 @@
   for ( SyncVarList::iterator it = syncVarList.begin(); it != syncVarList.end(); it++ )
   {
-    hasPermission = (
-        SharedNetworkData::getInstance()->isMasterServer() && (*it)->checkPermission( PERMISSION_MASTER_SERVER ) ||
-        this->owner == SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ) ||
-        SharedNetworkData::getInstance()->isMasterServer() && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ) ||
-            (*it)->checkPermission( PERMISSION_ALL )
-                    );
+    // DATA PERMISSIONS
+    // check if this synchronizeable has the permissions to write the data
+
+    // first check MASTER_SERVER permissions
+    if( SharedNetworkData::getInstance()->isMasterServer() && (*it)->checkPermission( PERMISSION_MASTER_SERVER ))
+      hasPermission = true;
+    // now check PROXY_SERVER permissions
+    else if( SharedNetworkData::getInstance()->isProxyServer() && (*it)->checkPermission( PERMISSION_MASTER_SERVER ))
+      hasPermission = true;
+    // now check OWNER permissions
+    else if( this->owner == SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ))
+      hasPermission = true;
+    // now check ALL permissions
+    else if( (*it)->checkPermission( PERMISSION_ALL ))
+      hasPermission = true;
+    // SPECIAL: get write permissions if i am master server and i am able to overwrite the client stuff
+    else if( SharedNetworkData::getInstance()->isMasterServer() && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
+      hasPermission = true;
+    // SPECIAL: get write permissions if i am proxy server and i am able to overwrite the client stuff
+    else if( SharedNetworkData::getInstance()->isProxyServer()  && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
+      hasPermission = true;
+    else
+      hasPermission = false;
+
 
     if ( sizeIter == stateFrom->sizeList.end() || *sizeIter != (*it)->getSize() )
@@ -209,5 +238,5 @@
       n = (*it)->writeToBuf( stateTo->data+i, stateTo->dataLength - i );
       //NETPRINTF(0)("getvar %s %d\n", (*it)->getName().c_str(), n);
-      PRINTF(0)("getvar %s %d\n", (*it)->getName().c_str(), n);
+      //PRINTF(0)("getvar %s %d\n", (*it)->getName().c_str(), n);
       stateTo->sizeList.push_back( n );
       // this is only for very hardcore debug sessions
@@ -257,4 +286,5 @@
  * @param fromStateId id of the base state id
  * @return number bytes read
+ *
  * @todo check for permissions
  */
@@ -275,14 +305,10 @@
   StateHistoryEntry * stateFrom = NULL;
 
+  // search the state from wich the diff is made of
   StateHistory::iterator it = recvStates[userId].begin();
   while ( it != recvStates[userId].end() && (*it)->stateId != fromStateId )
     it++;
 
-
-//  if ( getLeafClassID() == CL_SPACE_SHIP )
-//  {
-//    PRINTF(0)("setStateDiff:SpaceShip from: %d stateId: %d\n", (it == recvStates[userId].end())?-1:fromStateId, stateId);
-//  }
-
+  // if this is the first state to receive
   if ( it == recvStates[userId].end() )
   {
@@ -300,5 +326,6 @@
     stateFrom = (*it);
 
-  //apply diff
+
+  // apply diff
   for ( int i = 0; i<length; i++ )
   {
@@ -307,5 +334,4 @@
     else
       stateTo->data[i] = data[i];
-
   }
 
@@ -316,18 +342,40 @@
   int n = 0;
   std::list<int> changes;
-
+  bool hasPermission = false;
+
+  // extract the new state for every client
   for ( SyncVarList::iterator it = syncVarList.begin(); it != syncVarList.end(); it++ )
   {
-    if (
-        (*it)->checkPermission( PERMISSION_MASTER_SERVER ) && networkStream->isUserMasterServer( userId ) ||
-        (*it)->checkPermission( PERMISSION_OWNER ) && this->owner == userId ||
-        networkStream->isUserMasterServer( userId ) && this->owner != SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ) ||
-        (*it)->checkPermission( PERMISSION_ALL )
-       )
+    // DATA PERMISSIONS
+    // check if this synchronizeable has the permissions to write the data
+
+    // first check MASTER_SERVER permissions
+    if(  this->networkStream->isUserMasterServer( userId ) && (*it)->checkPermission( PERMISSION_MASTER_SERVER ))
+      hasPermission = true;
+    // now check PROXY_SERVER permissions
+    else if( this->networkStream->isUserProxyServer( userId )  && (*it)->checkPermission( PERMISSION_MASTER_SERVER ))
+      hasPermission = true;
+    // now check OWNER permissions
+    else if( this->owner == SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ))
+      hasPermission = true;
+    // now check ALL permissions
+    else if( (*it)->checkPermission( PERMISSION_ALL ))
+      hasPermission = true;
+    // SPECIAL: get write permissions if i am master server and i am able to overwrite the client stuff
+    else if( this->networkStream->isUserMasterServer( userId ) && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
+      hasPermission = true;
+    // SPECIAL: get write permissions if i am proxy server and i am able to overwrite the client stuff
+    else if( this->networkStream->isUserProxyServer( userId )  && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ))
+      hasPermission = true;
+    else
+      hasPermission = false;
+
+    // if it has the permission to write do it
+    if( hasPermission)
     {
       n = (*it)->readFromBuf( stateTo->data + i, stateTo->dataLength - i );
       i += n;
       //NETPRINTF(0)("%s::setvar %s %d\n", getClassCName(), (*it)->getName().c_str(), n);
-      PRINTF(0)("%s::setvar %s %d\n", getClassCName(), (*it)->getName().c_str(), n);
+      //PRINTF(0)("%s::setvar %s %d\n", getClassCName(), (*it)->getName().c_str(), n);
       //(*it)->debug();
       if ( (*it)->getHasChanged() )
Index: /branches/proxy/src/lib/network/synchronizeable.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable.h	(revision 9395)
+++ /branches/proxy/src/lib/network/synchronizeable.h	(revision 9396)
@@ -22,6 +22,4 @@
 #include <list>
 
-//State constants: They have to be of the form 2^n
-#define STATE_SERVER 1
 
 struct StateHistoryEntry
@@ -47,7 +45,4 @@
     Synchronizeable();
     virtual ~Synchronizeable();
-
-//     void setIsServer( bool isServer );
-//     bool isServer();
 
     virtual void varChangeHandler( std::list<int> & id );
@@ -79,5 +74,5 @@
   protected:
     NetworkStream*    networkStream;  //!< reference network stream we are connected to
-//     int               state;
+
 
   private:
Index: /branches/proxy/src/orxonox.cc
===================================================================
--- /branches/proxy/src/orxonox.cc	(revision 9395)
+++ /branches/proxy/src/orxonox.cc	(revision 9396)
@@ -72,5 +72,6 @@
 REGISTER_ARG_FLAG( l, license,    "misc",  "showLicenseAndExit", "Prints the license and exit",      "1" );
 REGISTER_ARG_FLAG( c, client,     "game",  "gameType",           "Connect to Server (-H)",           "multiplayer_client" );
-REGISTER_ARG_FLAG( s, server,     "game",  "gameType",           "Start Orxonox as Game Server",     "multiplayer_server" );
+REGISTER_ARG_FLAG( s, server,     "game",  "gameType",           "Start Orxonox as Game Server",     "multiplayer_master_server" );
+REGISTER_ARG_FLAG( x, proxy,      "game",  "gameType",           "Start Orxonox as Proxy Server",    "multiplayer_proxy_server" );
 REGISTER_ARG_ARG(  H, host,       "game",  "host",               "Host to connect to",               "host");
 REGISTER_ARG_ARG(  p, port,       "game",  "port",               "Port to use",                      "port" );
@@ -79,5 +80,6 @@
 REGISTER_ARG_FLAG( f, fullscreen, "video", "Fullscreen-mode",    "start Orxonox in fullscreen mode", "1");
 REGISTER_ARG_FLAG( w, windowed,   "video", "Fullscreen-mode",    "start Orxonox in windowed mode",   "0");
-REGISTER_ARG_ARG(  r, resolution, "video", "Resolution",         "Sets resolution / window size",    "res");
+REGISTER_ARG_ARG(  r, resolution, "video", "Resolution",         "sets resolution / window size",    "res");
+REGISTER_ARG_FLAG( d, dedicated,  "video", "Norender-mode",      "the scene is not rendered",        "1" );
 
 REGISTER_ARG_FLAG( a, audio,      "audio", "Disable-Audio",      "Enable audio",                     "0" );
@@ -144,5 +146,5 @@
   SDL_QuitSubSystem(SDL_INIT_TIMER);
   ClassList::debug();
-  
+
   Preferences::getInstance()->save();
 
@@ -301,16 +303,24 @@
 {
   PRINT(3)("> Initializing networking\n");
-
-  if( this->serverName != "") // we are a client
+  std::string gameType = Preferences::getInstance()->getString( "game", "gameType", "" );
+
+  if( gameType == "multiplayer_client") // we are a client
   {
     State::setOnline(true);
-    NetworkManager::getInstance()->establishConnection(this->serverName, port);
-  }
-  else if( this->port > 0)
-  {    // we are a server
+    NetworkManager::getInstance()->createClient(this->serverName, port);
+  }
+  else if( gameType == "multiplayer_master_server")
+  {    // we are a master server
     State::setOnline(true);
-    NetworkManager::getInstance()->createServer(port);
-  }
-  return 0;
+    NetworkManager::getInstance()->createMasterServer(port);
+  }
+  else if( gameType == "multiplayer_proxy_server")
+  {    // we are a proxy server
+    State::setOnline(true);
+    NetworkManager::getInstance()->createProxyServer(port);
+  }
+
+  return 0;
+
 }
 
@@ -459,5 +469,6 @@
   if( Preferences::getInstance()->getString("game", "showGui", "") == "1" )
     showGui = true;
-  else if( Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_server" ||
+  else if( Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_master_server" ||
+           Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_proxy_server" ||
            Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_client" )
     return startNetworkOrxonox(argc, argv);
@@ -493,9 +504,17 @@
     startOrxonox(argc, argv, host.c_str(), port);
   }
-  else if ( gameType == "multiplayer_server" )
+  else if ( gameType == "multiplayer_master_server" )
   {
     int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT );
 
     printf("Starting Orxonox as server: listening on port %i\n", port);
+
+    startOrxonox(argc, argv, "", port);
+  }
+  else if ( gameType == "multiplayer_proxy_server" )
+  {
+    int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT );
+
+    printf("Starting Orxonox as proxy server: listening on port %i\n", port);
 
     startOrxonox(argc, argv, "", port);
Index: /branches/proxy/src/story_entities/game_world.cc
===================================================================
--- /branches/proxy/src/story_entities/game_world.cc	(revision 9395)
+++ /branches/proxy/src/story_entities/game_world.cc	(revision 9396)
@@ -512,8 +512,13 @@
 void GameWorld::display ()
 {
+
+    // if this server is a dedicated server the game workd does not need to be drawn
+  if( !GraphicsEngine::getInstance()->isDedicated())
+  {
   // render the reflection texture
   this->renderPassReflection();
   // redner the refraction texture
   this->renderPassRefraction();
+  }
   // render all
   this->renderPassAll();
@@ -643,29 +648,33 @@
   LightManager::getInstance()->draw();
 
-  /* Draw the BackGround */
-  this->drawEntityList(State::getObjectManager()->getObjectList(OM_BACKGROUND));
-  engine->drawBackgroundElements();
-
-  /* draw all WorldEntiy groups */
-  for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
-    this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
-
-  AtmosphericEngine::getInstance()->draw();
-
-  if( unlikely( this->showBV))
-  {
-    CDEngine* engine = CDEngine::getInstance();
+  // only render the world if its not dedicated mode
+  if( !GraphicsEngine::getInstance()->isDedicated())
+  {
+    /* Draw the BackGround */
+    this->drawEntityList(State::getObjectManager()->getObjectList(OM_BACKGROUND));
+    engine->drawBackgroundElements();
+
+    /* draw all WorldEntiy groups */
     for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
-      engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]), this->showBVLevel);
-  }
-
-  if( unlikely(this->showPNodes))
-    PNode::getNullParent()->debugDraw(0);
+      this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
+
+    AtmosphericEngine::getInstance()->draw();
+
+    if( unlikely( this->showBV))
+    {
+      CDEngine* engine = CDEngine::getInstance();
+      for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
+        engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]), this->showBVLevel);
+    }
+
+    if( unlikely(this->showPNodes))
+      PNode::getNullParent()->debugDraw(0);
+
+    // draw the game ruls
+    if( likely(this->dataTank->gameRule != NULL))
+      this->dataTank->gameRule->draw();
+  }
 
   engine->draw();
-
-  // draw the game ruls
-  if( likely(this->dataTank->gameRule != NULL))
-    this->dataTank->gameRule->draw();
 }
 
Index: /branches/proxy/src/story_entities/menu/game_menu.cc
===================================================================
--- /branches/proxy/src/story_entities/menu/game_menu.cc	(revision 9395)
+++ /branches/proxy/src/story_entities/menu/game_menu.cc	(revision 9396)
@@ -574,5 +574,5 @@
       OrxGui::GLGuiButton* createButton = new OrxGui::GLGuiPushButton("Create Server");
       serverNetworkBox->pack(createButton);
-      createButton->released.connect(this, &GameMenu::createServer);
+      createButton->released.connect(this, &GameMenu::createMasterServer);
     }
   }
@@ -593,5 +593,5 @@
 
   State::setOnline(true);
-  NetworkManager::getInstance()->establishConnection( this->ipInputLine->_getText(), 9999 );
+  NetworkManager::getInstance()->createClient( this->ipInputLine->_getText(), 9999 );
 
   Preferences::getInstance()->setString( "multiplayer", "lastVisitedServer", this->ipInputLine->_getText() );
@@ -600,10 +600,10 @@
 }
 
-void GameMenu::createServer( )
+void GameMenu::createMasterServer( )
 {
   PRINTF(0)("Create server\n" );
 
   State::setOnline(true);
-  NetworkManager::getInstance()->createServer( 9999 );
+  NetworkManager::getInstance()->createMasterServer( 9999 );
 
   this->startLevel( 5 );
Index: /branches/proxy/src/story_entities/menu/game_menu.h
===================================================================
--- /branches/proxy/src/story_entities/menu/game_menu.h	(revision 9395)
+++ /branches/proxy/src/story_entities/menu/game_menu.h	(revision 9396)
@@ -50,5 +50,5 @@
     
     void showServerMenu();
-    void createServer();
+    void createMasterServer();
 
 
Index: /branches/proxy/src/story_entities/multi_player_world_data.cc
===================================================================
--- /branches/proxy/src/story_entities/multi_player_world_data.cc	(revision 9395)
+++ /branches/proxy/src/story_entities/multi_player_world_data.cc	(revision 9396)
@@ -47,5 +47,5 @@
 #include "player_stats.h"
 
-#include "proxy/proxy_settings.h"
+#include "proxy/network_settings.h"
 
 #include "glmenu_imagescreen.h"
@@ -112,5 +112,5 @@
   const TiXmlElement* element = NULL;
 
-  if( NetworkManager::getInstance()->isMasterServer() )
+  if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
   {
     /* load the spawning points */
@@ -148,5 +148,5 @@
     element = element->FirstChildElement();
 
-    if( NetworkManager::getInstance()->isMasterServer() )
+    if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
     {
       while( element != NULL)
@@ -206,5 +206,5 @@
 
 
-    if( NetworkManager::getInstance()->isMasterServer())
+    if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
     {
       this->localPlayer = new Player();
@@ -281,8 +281,8 @@
   GameWorldData::loadScene(root);
 
-//   LoadParamXML(root, "ProxySettings", ProxySettings::getInstance(), ProxySettings, loadProxySettings);
+//   LoadParamXML(root, "NetworkSettings", NetworkSettings::getInstance(), NetworkSettings, loadNetworkSettings);
 
   // create server playable
-  if ( NetworkManager::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
   {
     NetworkGameManager::getInstance()->signalNewPlayer( 0 );
@@ -300,5 +300,5 @@
 {
   // delete the proxy settings
-  delete ProxySettings::getInstance();
+  delete NetworkSettings::getInstance();
 
   /* call underlying function */
Index: /branches/proxy/src/subprojects/network/network_unit_test.cc
===================================================================
--- /branches/proxy/src/subprojects/network/network_unit_test.cc	(revision 9395)
+++ /branches/proxy/src/subprojects/network/network_unit_test.cc	(revision 9396)
@@ -205,5 +205,5 @@
 
   /* create a server stream */
-  nm->createServer(port);
+  nm->createMasterServer(port);
 
   /* esatblish a connection */
@@ -213,5 +213,5 @@
   if(error == -1)
     printf("\n\nerror on address resolution, program inconsistancy\n\n");
-  nm->establishConnection("localhost", port);
+  nm->createClient("localhost", port);
   nm->connectSynchronizeable( *clientSync );
   /* adding some break for connection setup */
@@ -262,5 +262,5 @@
   netMan->initialize();
   
-  netMan->createServer(/**ss, */ 9999);
+  netMan->createMasterServer(/**ss, */ 9999);
   
   SimpleSync* ss = new SimpleSync("Server");
@@ -307,5 +307,5 @@
     host = "localhost";
   
-  netMan->establishConnection(host, 9999);
+  netMan->createClient(host, 9999);
   
 //  SimpleSync* ss = new SimpleSync("SimpleSync");
@@ -361,5 +361,5 @@
   Synchronizeable* ss = new SimpleSync("SimpleSync\0");
 
-  netMan->establishConnection( name, port );
+  netMan->createClient( name, port );
   netMan->connectSynchronizeable( *ss );
 
Index: /branches/proxy/src/util/game_rules.cc
===================================================================
--- /branches/proxy/src/util/game_rules.cc	(revision 9395)
+++ /branches/proxy/src/util/game_rules.cc	(revision 9396)
@@ -87,5 +87,5 @@
 void GameRules::registerKill(const Kill& kill)
 {
-  if ( !SharedNetworkData::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isClient() )
     return;
 
Index: /branches/proxy/src/util/kill_target.cc
===================================================================
--- /branches/proxy/src/util/kill_target.cc	(revision 9395)
+++ /branches/proxy/src/util/kill_target.cc	(revision 9396)
@@ -56,4 +56,7 @@
 
 
-MissionState KillTarget::checkMissionGoal(float dt) {}
+MissionState KillTarget::checkMissionGoal(float dt)
+{
 
+}
+
Index: /branches/proxy/src/util/multiplayer_team_deathmatch.cc
===================================================================
--- /branches/proxy/src/util/multiplayer_team_deathmatch.cc	(revision 9395)
+++ /branches/proxy/src/util/multiplayer_team_deathmatch.cc	(revision 9396)
@@ -204,5 +204,5 @@
   assignPlayable();
 
-  if ( !SharedNetworkData::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isClient() )
     return;
 
@@ -268,5 +268,5 @@
 void MultiplayerTeamDeathmatch::checkGameRules()
 {
-  if ( !SharedNetworkData::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isClient() )
     return;
 
Index: /branches/proxy/src/world_entities/bsp_entity.cc
===================================================================
--- /branches/proxy/src/world_entities/bsp_entity.cc	(revision 9395)
+++ /branches/proxy/src/world_entities/bsp_entity.cc	(revision 9396)
@@ -1,12 +1,12 @@
 /*
    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: Claudio Botta
@@ -53,7 +53,7 @@
 
   this->bspManager = NULL;
- 
+
   this->name_handle = registerVarId( new SynchronizeableString( &this->name, &this->name_write, "name" ) );
-  
+
   this->setSynchronized( true );
 }
@@ -63,5 +63,5 @@
 {
   PRINTF(0)("+++++++++++ LOADING NAME %s\n", name.c_str());
-  
+
   this->name = name;
 
Index: /branches/proxy/src/world_entities/creatures/fps_player.cc
===================================================================
--- /branches/proxy/src/world_entities/creatures/fps_player.cc	(revision 9395)
+++ /branches/proxy/src/world_entities/creatures/fps_player.cc	(revision 9396)
@@ -287,5 +287,5 @@
   //dealing damage
 
-  if ( State::isOnline() && SharedNetworkData::getInstance()->isMasterServer() )
+  if ( State::isOnline() && (SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer()))
   {
     this->damageTicker -= time;
Index: /branches/proxy/src/world_entities/space_ships/space_ship.cc
===================================================================
--- /branches/proxy/src/world_entities/space_ships/space_ship.cc	(revision 9395)
+++ /branches/proxy/src/world_entities/space_ships/space_ship.cc	(revision 9396)
@@ -314,5 +314,5 @@
   if( entity->isA(CL_PROJECTILE) && entity != ref)
   {
-    if ( SharedNetworkData::getInstance()->isMasterServer() )
+    if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
     {
       //TODO handle this
Index: /branches/proxy/src/world_entities/spawning_point.cc
===================================================================
--- /branches/proxy/src/world_entities/spawning_point.cc	(revision 9395)
+++ /branches/proxy/src/world_entities/spawning_point.cc	(revision 9396)
@@ -178,5 +178,5 @@
       }
 
-      if ( found && SharedNetworkData::getInstance()->isMasterServer() )
+      if ( found && SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
         this->sendRespawnMessage( it->entity->getUniqueID() );
 
@@ -218,5 +218,5 @@
 bool SpawningPoint::respawnMessageHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
 {
-  if ( SharedNetworkData::getInstance()->isMasterServer() )
+  if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer())
   {
     PRINTF(2)("server received spawn message!\n");
