Index: /branches/proxy/src/lib/network/netdefs.h
===================================================================
--- /branches/proxy/src/lib/network/netdefs.h	(revision 9252)
+++ /branches/proxy/src/lib/network/netdefs.h	(revision 9253)
@@ -1,3 +1,19 @@
+/*
+   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 rennerc@ee.ethz.ch
+   co-programmer:   Patrick Boenzli  boenzlip@orxonox.ethz.ch
+
+     June 2006: finishing work on the network stream for pps presentation (rennerc@ee.ethz.ch)
+     July 2006: some code rearangement and integration of the proxy server mechanism (boenzlip@ee.ethz.ch)
+*/
 
 /*!
Index: /branches/proxy/src/lib/network/network_game_manager.cc
===================================================================
--- /branches/proxy/src/lib/network/network_game_manager.cc	(revision 9252)
+++ /branches/proxy/src/lib/network/network_game_manager.cc	(revision 9253)
@@ -10,12 +10,13 @@
 
 ### File Specific:
-   main-programmer: Benjamin Wuest
-   co-programmer: ...
+   main-programmer: Christoph Renner rennerc@ee.ethz.ch
+   co-programmer:   Patrick Boenzli  boenzlip@orxonox.ethz.ch
+
+     June 2006: finishing work on the network stream for pps presentation (rennerc@ee.ethz.ch)
+     July 2006: some code rearangement and integration of the proxy server mechanism (boenzlip@ee.ethz.ch)
 */
 
 
-/* this is for debug output. It just says, that all calls to PRINT() belong to the DEBUG_MODULE_NETWORK module
-   For more information refere to https://www.orxonox.net/cgi-bin/trac.cgi/wiki/DebugOutput
-*/
+
 #define DEBUG_MODULE_NETWORK
 
@@ -45,5 +46,4 @@
 
 
-/* using namespace std is default, this needs to be here */
 using namespace std;
 
@@ -62,9 +62,9 @@
 
   this->setSynchronized(true);
-  
+
   MessageManager::getInstance()->registerMessageHandler( MSGID_DELETESYNCHRONIZEABLE, delSynchronizeableHandler, NULL );
   MessageManager::getInstance()->registerMessageHandler( MSGID_PREFEREDTEAM, preferedTeamHandler, NULL );
   MessageManager::getInstance()->registerMessageHandler( MSGID_CHATMESSAGE, chatMessageHandler, NULL );
-  
+
   this->gameState = 0;
   registerVar( new SynchronizeableInt( &gameState, &gameState, "gameState" ) );
@@ -77,7 +77,7 @@
 {
   delete MessageManager::getInstance();
-  
+
   PlayerStats::deleteAllPlayerStats();
-  
+
   NetworkGameManager::singletonRef = NULL;
 }
@@ -86,6 +86,6 @@
 /**
  * insert new player into game
- * @param userId 
- * @return 
+ * @param userId
+ * @return
  */
 bool NetworkGameManager::signalNewPlayer( int userId )
@@ -94,7 +94,7 @@
   assert( State::getGameRules() );
   assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) );
-  
+
   NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
-  
+
   int team = rules.getTeamForNewUser();
   ClassID playableClassId = rules.getPlayableClassId( userId, team );
@@ -102,36 +102,36 @@
   std::string playableTexture = rules.getPlayableModelFileName( userId, team, playableClassId );
   float       playableScale = rules.getPlayableScale( userId, team, playableClassId );
-  
+
   BaseObject * bo = Factory::fabricate( playableClassId );
-  
+
   assert( bo != NULL );
   assert( bo->isA( CL_PLAYABLE ) );
-  
+
   Playable & playable = *(dynamic_cast<Playable*>(bo));
-  
+
   playable.loadMD2Texture( playableTexture );
-  
+
   playable.loadModel( playableModel, 100.0f );
   playable.setOwner( userId );
   playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
   playable.setSynchronized( true );
-  
+
   PlayerStats * stats = rules.getNewPlayerStats( userId );
-  
+
   stats->setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() );
   stats->setSynchronized( true );
   stats->setOwner( SharedNetworkData::getInstance()->getHostID() );
-  
+
   stats->setTeamId( team );
   stats->setPlayableClassId( playableClassId );
   stats->setPlayableUniqueId( playable.getUniqueID() );
   stats->setModelFileName( playableModel );
-  
+
   if ( userId == 0 )
     stats->setNickName( Preferences::getInstance()->getString( "multiplayer", "nickname", "Server" ) );
-  
+
   if ( rules.isA( CL_MULTIPLAYER_TEAM_DEATHMATCH ) )
     dynamic_cast<MultiplayerTeamDeathmatch*>(&rules)->respawnPlayable( &playable, team, 0.0f );
-  
+
   return true;
 }
@@ -140,6 +140,6 @@
 /**
  * remove player from game
- * @param userID 
- * @return 
+ * @param userID
+ * @return
  */
 bool NetworkGameManager::signalLeftPlayer(int userID)
@@ -151,5 +151,5 @@
     delete PlayerStats::getStats( userID );
   }
-  
+
   return true;
 }
@@ -159,9 +159,9 @@
 /**
  * handler for remove synchronizeable messages
- * @param messageId 
- * @param data 
- * @param dataLength 
- * @param someData 
- * @param userId 
+ * @param messageId
+ * @param data
+ * @param dataLength
+ * @param someData
+ * @param userId
  * @return true on successfull handling else handler will be called again
  */
@@ -173,8 +173,8 @@
     return true;
   }
-  
+
   int uniqueId = 0;
   int len = Converter::byteArrayToInt( data, &uniqueId );
-  
+
   if ( len != dataLength )
   {
@@ -182,7 +182,7 @@
     return true;
   }
-  
+
   const std::list<BaseObject*> * list = ClassList::getList( CL_SYNCHRONIZEABLE );
-  
+
   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
   {
@@ -194,10 +194,10 @@
         return true;
       }
-      
+
       delete dynamic_cast<Synchronizeable*>(*it);
       return true;
     }
   }
-  
+
   return true;
 }
@@ -210,5 +210,5 @@
 {
   byte buf[INTSIZE];
-  
+
   assert( Converter::intToByteArray( uniqueId, buf, INTSIZE ) == INTSIZE );
 
@@ -220,18 +220,18 @@
 /**
  * handler for MSGID_PREFEREDTEAM message
- * @param messageId 
- * @param data 
- * @param dataLength 
- * @param someData 
- * @param userId 
- * @return 
+ * @param messageId
+ * @param data
+ * @param dataLength
+ * @param someData
+ * @param userId
+ * @return
  */
 bool NetworkGameManager::preferedTeamHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
 {
   assert( NetworkGameManager::getInstance()->isServer() );
-  
+
   int teamId = 0;
   int len = Converter::byteArrayToInt( data, &teamId );
-  
+
   if ( len != dataLength )
   {
@@ -239,7 +239,7 @@
     return true;
   }
-  
+
   NetworkGameManager::getInstance()->setPreferedTeam( userId, teamId );
-  
+
   return true;
 }
@@ -249,7 +249,7 @@
   if ( !PlayerStats::getStats( userId ) )
     return;
-  
+
   PlayerStats & stats = *(PlayerStats::getStats( userId ));
-  
+
   stats.setPreferedTeamId( teamId );
 }
@@ -257,5 +257,5 @@
 /**
  * set prefered team for this host
- * @param teamId 
+ * @param teamId
  */
 void NetworkGameManager::prefereTeam( int teamId )
@@ -266,7 +266,7 @@
   {
     byte buf[INTSIZE];
-    
+
     assert( Converter::intToByteArray( teamId, buf, INTSIZE) == INTSIZE );
-    
+
     MessageManager::getInstance()->sendMessage( MSGID_PREFEREDTEAM, buf, INTSIZE, RT_USER, 0, MP_HIGHBANDWIDTH );
   }
@@ -285,7 +285,7 @@
     {
       const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
-       
+
       if ( list && std::find( list->begin(), list->end(), *it ) != list->end() )
-      {      
+      {
         PRINTF(0)("Delete unused playable: %s owner: %d\n", (*it)->getClassName(), (*it)->getOwner() );
         std::list<Playable*>::iterator delit = it;
@@ -309,17 +309,17 @@
     MessageManager::getInstance()->sendMessage( messageId, data, dataLength, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
   }
-  
+
   assert( State::getGameRules() );
   assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) );
-  
+
   NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
-  
+
   if ( dataLength < 3*INTSIZE )
   {
     PRINTF(2)("got too small chatmessage from client %d\n", userId);
-    
+
     return true;
   }
-  
+
   int messageType = 0;
   Converter::byteArrayToInt( data, &messageType );
@@ -328,5 +328,5 @@
   std::string message;
   Converter::byteArrayToString( data+2*INTSIZE, message, dataLength-2*INTSIZE );
-  
+
   rules.handleChatMessage( senderUserId, message, messageType );
 
@@ -346,5 +346,5 @@
   assert( Converter::intToByteArray( SharedNetworkData::getInstance()->getHostID(), buf+INTSIZE, INTSIZE ) == INTSIZE );
   assert( Converter::stringToByteArray(message, buf+2*INTSIZE, message.length()+INTSIZE) == message.length()+INTSIZE );
-  
+
   if ( this->isServer() )
     MessageManager::getInstance()->sendMessage( MSGID_CHATMESSAGE, buf, message.length()+3*INTSIZE, RT_ALL_ME, 0, MP_HIGHBANDWIDTH );
@@ -352,5 +352,5 @@
     MessageManager::getInstance()->sendMessage( MSGID_CHATMESSAGE, buf, message.length()+3*INTSIZE, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
 
-  
+
   delete [] buf;
 }
Index: /branches/proxy/src/lib/network/network_game_manager.h
===================================================================
--- /branches/proxy/src/lib/network/network_game_manager.h	(revision 9252)
+++ /branches/proxy/src/lib/network/network_game_manager.h	(revision 9253)
@@ -28,6 +28,4 @@
   NET_YOU_ARE_ENTITY,
   NET_REQUEST_ENTITY_LIST,
-  NET_REQUEST_PNODE_PATH,
-  NET_SEND_PNODE_PATH,
 
   NET_NUMBER
