Index: branches/proxy/src/lib/network/network_game_manager.cc
===================================================================
--- branches/proxy/src/lib/network/network_game_manager.cc	(revision 9256)
+++ branches/proxy/src/lib/network/network_game_manager.cc	(revision 9257)
@@ -91,5 +91,5 @@
 bool NetworkGameManager::signalNewPlayer( int userId )
 {
-  assert( SharedNetworkData::getInstance()->isGameServer() );
+  assert( SharedNetworkData::getInstance()->isMasterServer() );
   assert( State::getGameRules() );
   assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) );
Index: branches/proxy/src/lib/network/network_manager.cc
===================================================================
--- branches/proxy/src/lib/network/network_manager.cc	(revision 9256)
+++ branches/proxy/src/lib/network/network_manager.cc	(revision 9257)
@@ -53,8 +53,8 @@
   this->networkStream = NULL;
   this->elapsedTime = 0.0f;
-  
-    
+
+
   int port = Preferences::getInstance()->getInt( "network", "telnetport", 0 );
-  
+
   if ( port > 0 )
     NetworkLog::getInstance()->listen( port );
@@ -75,5 +75,5 @@
     this->networkStream = NULL;
   }
-  
+
   NetworkManager::singletonRef = NULL;
 }
@@ -118,5 +118,5 @@
 {
   SharedNetworkData::getInstance()->setHostID(0);
-  SharedNetworkData::getInstance()->setGameServer(true);
+  SharedNetworkData::getInstance()->setNodeType(NET_MASTER_SERVER);
   this->networkStream = new NetworkStream(port);
   SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
@@ -148,5 +148,5 @@
   if ( networkStream )
     networkStream->processData();
-  
+
   NetworkGameManager::getInstance()->tick( this->elapsedTime );
 }
Index: branches/proxy/src/lib/network/network_manager.h
===================================================================
--- branches/proxy/src/lib/network/network_manager.h	(revision 9256)
+++ branches/proxy/src/lib/network/network_manager.h	(revision 9257)
@@ -41,5 +41,7 @@
     /** Returns the hostID @return The hostID of the object */
     inline int getHostID() { return SharedNetworkData::getInstance()->getHostID(); }
-    inline bool isGameServer() { return SharedNetworkData::getInstance()->isGameServer(); }
+    inline bool isMasterServer() { return SharedNetworkData::getInstance()->isMasterServer(); }
+    inline bool isProxyServer() { return SharedNetworkData::getInstance()->isProxyServer(); }
+    inline bool isClient() { return SharedNetworkData::getInstance()->isClient(); }
 
 
Index: branches/proxy/src/lib/network/player_stats.cc
===================================================================
--- branches/proxy/src/lib/network/player_stats.cc	(revision 9256)
+++ branches/proxy/src/lib/network/player_stats.cc	(revision 9257)
@@ -38,5 +38,5 @@
 {
   init();
-  
+
   this->userId = userId;
 }
@@ -62,5 +62,5 @@
   this->nickName = "Player";
   this->oldNickName = "Player";
-  
+
   userId_handle = registerVarId( new SynchronizeableInt( &userId, &userId, "userId" ) );
   teamId_handle = registerVarId( new SynchronizeableInt( &teamId, &teamId, "teamId" ) );
@@ -71,7 +71,7 @@
   modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) );
   nickName_handler = registerVarId( new SynchronizeableString( &nickName, &nickName, "nickName" ) );
-  
+
   MessageManager::getInstance()->registerMessageHandler( MSGID_CHANGENICKNAME, changeNickHandler, NULL );
-  
+
   PRINTF(0)("PlayerStats created\n");
 }
@@ -96,8 +96,8 @@
   {
     this->setPlayableUniqueId( this->playableUniqueId );
-    
+
     PRINTF(0)("uniqueID changed %d %d %d\n", userId, SharedNetworkData::getInstance()->getHostID(), getUniqueID());
   }
-  
+
   if ( std::find( id.begin(), id.end(), nickName_handler ) != id.end() )
   {
@@ -115,10 +115,10 @@
 {
   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
-  
+
   if ( !list )
   {
     return NULL;
   }
-  
+
   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
   {
@@ -128,5 +128,5 @@
     }
   }
-  
+
   return NULL;
 }
@@ -138,5 +138,5 @@
 {
   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
-  
+
   if ( !list )
   {
@@ -144,5 +144,5 @@
     return;
   }
-  
+
   this->playable = NULL;
   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
@@ -156,10 +156,10 @@
     }
   }
-  
+
   if ( this->playable && userId == SharedNetworkData::getInstance()->getHostID() )
   {
     State::getPlayer()->setPlayable( this->playable );
   }
-  
+
   this->playableUniqueId = uniqueId;
 }
@@ -173,11 +173,11 @@
   if ( playable )
     return playable;
-  
+
   assert( playableUniqueId > 0 );
-  
+
   setPlayableUniqueId( playableUniqueId );
-  
+
   assert( playable );
-  
+
   return playable;
 }
@@ -189,5 +189,5 @@
 void PlayerStats::setNickName( std::string nick )
 {
-  if ( SharedNetworkData::getInstance()->isGameServer() )
+  if ( SharedNetworkData::getInstance()->isMasterServer() )
   {
     this->nickName = nick;
@@ -199,7 +199,7 @@
   {
     byte * data = new byte[nick.length()+INTSIZE];
-    
+
     assert( Converter::stringToByteArray( nick, data, nick.length()+INTSIZE) == nick.length()+INTSIZE );
-    
+
     MessageManager::getInstance()->sendMessage( MSGID_CHANGENICKNAME, data, nick.length()+INTSIZE, RT_SERVER, 0, MP_HIGHBANDWIDTH );
     return;
@@ -211,5 +211,5 @@
   std::string newNick;
   int res = Converter::byteArrayToString( data, newNick, dataLength );
-  
+
   if ( res != dataLength )
   {
@@ -217,8 +217,8 @@
     newNick = "invalid";
   }
-  
+
   if ( PlayerStats::getStats( userId ) )
     PlayerStats::getStats( userId )->setNickName( newNick );
-  
+
   return true;
 }
@@ -228,5 +228,5 @@
   if ( getStats( SharedNetworkData::getInstance()->getHostID() ) )
     getStats( SharedNetworkData::getInstance()->getHostID() )->setNickName( newNick );
-    
+
   Preferences::getInstance()->setString( "multiplayer", "nickname", newNick );
 }
@@ -237,5 +237,5 @@
 {
   const std::list<BaseObject*> * list;
-  
+
   while ( (list  = ClassList::getList( CL_PLAYER_STATS )) != NULL && list->begin() != list->end() )
     delete *list->begin();
@@ -247,30 +247,30 @@
 {
   ScoreList result;
-  
+
   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
-  
+
   if ( !list )
   {
     return result;
   }
-  
+
   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
   {
     PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
-    
+
     TeamScoreList::iterator it = result[stats.getTeamId()].begin();
-    
+
     while (  it != result[stats.getTeamId()].end() && stats.score > it->score )
     {
       it++;
     }
-    
+
     PlayerScore score;
     score.name = stats.getNickName();
     score.score = stats.getScore();
-    
+
     result[stats.getTeamId()].insert(it, score);
   }
-  
+
   return result;
 }
Index: branches/proxy/src/lib/network/shared_network_data.cc
===================================================================
--- branches/proxy/src/lib/network/shared_network_data.cc	(revision 9256)
+++ branches/proxy/src/lib/network/shared_network_data.cc	(revision 9257)
@@ -36,5 +36,5 @@
   this->defaultSyncStream = NULL;
   this->newUniqueID = MAX_CONNECTIONS + 2;
-  this->bGameServer = false;
+  this->nodeType = NET_CLIENT;
 }
 
Index: branches/proxy/src/lib/network/shared_network_data.h
===================================================================
--- branches/proxy/src/lib/network/shared_network_data.h	(revision 9256)
+++ branches/proxy/src/lib/network/shared_network_data.h	(revision 9257)
@@ -8,4 +8,5 @@
 
 #include "base_object.h"
+#include "netdefs.h"
 
 
@@ -25,10 +26,14 @@
 
     /** @returns the next uniqueID free for an object */
-    inline int getNewUniqueID() { return ( this->bGameServer)?this->newUniqueID++:-1; }
+    inline int getNewUniqueID() { return ( this->nodeType != NET_CLIENT)?this->newUniqueID++:-1; }
 
-    /** @returns true is this node is a game server */
-    inline bool isGameServer() { return this->bGameServer; }
+    /** @returns true is this node is a master server */
+    inline bool isMasterServer() { return this->nodeType == NET_MASTER_SERVER; }
+    /** @returns true is this node is a proxy server */
+    inline bool isProxyServer() { return this->nodeType == NET_PROXY_SERVER; }
+    /** @returns true is this node is a client*/
+    inline bool isClient() { return this->nodeType == NET_CLIENT; }
     /** sets the game server flag @param bGameServer true if it is a game server */
-    inline void setGameServer(bool bGameServer) { this->bGameServer = bGameServer; }
+    inline void setNodeType(int nodeType) { this->nodeType = nodeType; }
 
     /** @returns the hostID of the node */
@@ -49,5 +54,6 @@
   private:
     int                             newUniqueID;             //!< next uniqueID
-    bool                            bGameServer;             //!< true if it is a server
+    int                             nodeType;                //!< saves the node type here
+
     int                             hostID;                  //!< The Host-ID of the Manager
     NetworkStream*                  defaultSyncStream;       //!< default synchronize NetworkStream
Index: branches/proxy/src/story_entities/multi_player_world_data.cc
===================================================================
--- branches/proxy/src/story_entities/multi_player_world_data.cc	(revision 9256)
+++ branches/proxy/src/story_entities/multi_player_world_data.cc	(revision 9257)
@@ -110,6 +110,6 @@
 {
   const TiXmlElement* element = NULL;
-  
-  if( NetworkManager::getInstance()->isGameServer() )
+
+  if( NetworkManager::getInstance()->isMasterServer() )
   {
     /* load the spawning points */
@@ -147,5 +147,5 @@
     element = element->FirstChildElement();
 
-    if( NetworkManager::getInstance()->isGameServer() )
+    if( NetworkManager::getInstance()->isMasterServer() )
     {
       while( element != NULL)
@@ -205,5 +205,5 @@
 
 
-    if( NetworkManager::getInstance()->isGameServer())
+    if( NetworkManager::getInstance()->isMasterServer())
     {
       this->localPlayer = new Player();
@@ -281,5 +281,5 @@
 
   // create server playable
-  if ( NetworkManager::getInstance()->isGameServer() )
+  if ( NetworkManager::getInstance()->isMasterServer() )
   {
     NetworkGameManager::getInstance()->signalNewPlayer( 0 );
Index: branches/proxy/src/util/game_rules.cc
===================================================================
--- branches/proxy/src/util/game_rules.cc	(revision 9256)
+++ branches/proxy/src/util/game_rules.cc	(revision 9257)
@@ -88,5 +88,5 @@
 void GameRules::registerKill(const Kill& kill)
 {
-  if ( !SharedNetworkData::getInstance()->isGameServer() )
+  if ( !SharedNetworkData::getInstance()->isMasterServer() )
     return;
 
Index: branches/proxy/src/util/multiplayer_team_deathmatch.cc
===================================================================
--- branches/proxy/src/util/multiplayer_team_deathmatch.cc	(revision 9256)
+++ branches/proxy/src/util/multiplayer_team_deathmatch.cc	(revision 9257)
@@ -204,5 +204,5 @@
   assignPlayable();
 
-  if ( !SharedNetworkData::getInstance()->isGameServer() )
+  if ( !SharedNetworkData::getInstance()->isMasterServer() )
     return;
 
@@ -214,5 +214,5 @@
     this->killList.erase( this->killList.begin() );
   }
-  
+
 
 
@@ -268,5 +268,5 @@
 void MultiplayerTeamDeathmatch::checkGameRules()
 {
-  if ( !SharedNetworkData::getInstance()->isGameServer() )
+  if ( !SharedNetworkData::getInstance()->isMasterServer() )
     return;
 
@@ -320,5 +320,5 @@
       return "maps/male_fiend.pcx";
   }
-  
+
   return "";
 }
@@ -330,5 +330,5 @@
     return 10.0f;
   }
-  
+
   return 1.0f;
 }
@@ -680,5 +680,5 @@
   char st[10];
   int i = 0;
-  
+
   i = 2;
   for ( TeamScoreList::const_iterator it = scoreList[0].begin(); it != scoreList[0].end(); it++ )
@@ -719,13 +719,13 @@
     return;
   }
-  
+
   int killerUserId = killer->getOwner();
   int victimUserId = victim->getOwner();
-  
+
   PRINTF(0)("%d %d %x %x %s %s\n", killerUserId, victimUserId, killer, victim, killer->getClassName(), victim->getClassName());
 
   PlayerStats & victimStats = *PlayerStats::getStats( victimUserId );
   PlayerStats & killerStats = *PlayerStats::getStats( killerUserId );
-  
+
   if ( killerStats.getPlayable() != killer || victimStats.getPlayable() != victim )
   {
Index: branches/proxy/src/world_entities/creatures/fps_player.cc
===================================================================
--- branches/proxy/src/world_entities/creatures/fps_player.cc	(revision 9256)
+++ branches/proxy/src/world_entities/creatures/fps_player.cc	(revision 9257)
@@ -287,5 +287,5 @@
   //dealing damage
 
-  if ( State::isOnline() && SharedNetworkData::getInstance()->isGameServer() )
+  if ( State::isOnline() && SharedNetworkData::getInstance()->isMasterServer() )
   {
     this->damageTicker -= time;
Index: branches/proxy/src/world_entities/playable.cc
===================================================================
--- branches/proxy/src/world_entities/playable.cc	(revision 9256)
+++ branches/proxy/src/world_entities/playable.cc	(revision 9257)
@@ -361,28 +361,4 @@
   }
 }
-/**
- * @brief helps us colliding Playables
- * @param entity the Entity to collide
- * @param location where the collision occured.
- */
-void Playable::collidesWith(WorldEntity* entity, const Vector& location)
-{
-  if (entity == collider)
-    return;
-  collider = entity;
-
-  if ( entity->isA(CL_PROJECTILE) && ( !State::isOnline() || SharedNetworkData::getInstance()->isGameServer() ) )
-  {
-    this->decreaseHealth(entity->getHealth() *(float)rand()/(float)RAND_MAX);
-    // EXTREME HACK
-    if (this->getHealth() <= 0.0f)
-    {
-//       this->destory();
-
-      if( State::getGameRules() != NULL)
-        State::getGameRules()->registerKill(Kill(entity, this));
-    }
-  }
-}
 
 
@@ -413,5 +389,5 @@
     }
     this->bDead = true;
-    
+
     if( State::getGameRules() != NULL)
       State::getGameRules()->registerKill(Kill(killer, this));
Index: branches/proxy/src/world_entities/playable.h
===================================================================
--- branches/proxy/src/world_entities/playable.h	(revision 9256)
+++ branches/proxy/src/world_entities/playable.h	(revision 9257)
@@ -82,5 +82,4 @@
   virtual void destroy(WorldEntity* killer);
   virtual void respawn();
-  virtual void collidesWith(WorldEntity* entity, const Vector& location);
   virtual void process(const Event &event);
   virtual void tick(float dt);
@@ -90,5 +89,5 @@
   static const std::string& playmodeToString(Playable::Playmode playmode);
   static const std::string playmodeNames[];
-  
+
   inline bool beFire(){ return this->bFire; }
   inline void fire(bool bF){ this->bFire = bF;}
Index: branches/proxy/src/world_entities/spawning_point.cc
===================================================================
--- branches/proxy/src/world_entities/spawning_point.cc	(revision 9256)
+++ branches/proxy/src/world_entities/spawning_point.cc	(revision 9257)
@@ -41,5 +41,5 @@
 
   this->init();
-  
+
   if (root != NULL)
     this->loadParams(root);
@@ -50,12 +50,12 @@
   this->setClassID(CL_SPAWNING_POINT, "SpawningPoint");
   PRINTF(0)("Created SpawningPoint\n");
-  
+
   this->teamId = -1;
   this->localTimer = 0.0f;
-  
+
   this->toList( OM_DEAD_TICK );
-  
+
   MessageManager::getInstance()->registerMessageHandler( MSGID_RESPAWN, respawnMessageHandler, NULL );
-  
+
   this->setSynchronized( true );
 }
@@ -94,5 +94,5 @@
   qe.entity = entity;
   qe.respawnTime = this->localTimer + delay;
-  
+
   queue.push_back( qe );
 }
@@ -105,10 +105,10 @@
 {
   const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
-  
+
   bool found = false;
-  
+
   if ( !list )
     return;
-    
+
   for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
   {
@@ -119,5 +119,5 @@
     }
   }
-  
+
   if ( !found )
     return;
@@ -128,12 +128,12 @@
   entity->setAbsCoor( this->getAbsCoor() );
   entity->setAbsDir( this->getAbsDir() );
-  
+
   //TODO set camera (not smooth)
-  
+
   if ( State::getGameRules() )
   {
     (State::getGameRules())->registerSpawn( entity );
   }
-  
+
   entity->respawn();
 }
@@ -157,12 +157,12 @@
       //spawn the player
       this->spawn(it->entity);
-      
+
       const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
-  
+
       bool found = false;
-  
+
       if ( !list )
         return;
-    
+
       for ( std::list<BaseObject*>::const_iterator it2 = list->begin(); it2 != list->end(); it2++ )
       {
@@ -173,16 +173,16 @@
         }
       }
-  
-      if ( found && SharedNetworkData::getInstance()->isGameServer() )
+
+      if ( found && SharedNetworkData::getInstance()->isMasterServer() )
         this->sendRespawnMessage( it->entity->getUniqueID() );
 
       std::list<QueueEntry>::iterator delit = it;
       it++;
-      
+
       queue.erase( delit );
-      
+
       continue;
     }
-    
+
     it++;
   }
@@ -204,8 +204,8 @@
 {
   byte * buf = new byte[2*INTSIZE];
-  
+
   assert( Converter::intToByteArray( this->getUniqueID(), buf, INTSIZE ) == INTSIZE );
   assert( Converter::intToByteArray( uniqueId, buf + INTSIZE, INTSIZE ) == INTSIZE );
-  
+
   MessageManager::getInstance()->sendMessage( MSGID_RESPAWN, buf, 2*INTSIZE, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
 }
@@ -213,13 +213,13 @@
 bool SpawningPoint::respawnMessageHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
 {
-  if ( SharedNetworkData::getInstance()->isGameServer() )
+  if ( SharedNetworkData::getInstance()->isMasterServer() )
   {
     PRINTF(2)("server received spawn message!\n");
     return true;
   }
-    
+
   int spUniqueId;
   int uniqueId;
-  
+
   if ( dataLength != 2*INTSIZE )
   {
@@ -227,15 +227,15 @@
     return true;
   }
-  
+
   assert( Converter::byteArrayToInt( data, &spUniqueId ) == INTSIZE );
   assert( Converter::byteArrayToInt( data+INTSIZE, &uniqueId ) == INTSIZE );
-  
+
   PRINTF(0)("SPAWNMESSAGE %d\n", uniqueId);
-  
+
   SpawningPoint * sp = NULL;
   Playable      * playable = NULL;
-  
+
   const std::list<BaseObject*> * list = ClassList::getList( CL_SPAWNING_POINT );
-  
+
   if ( list )
   {
@@ -250,5 +250,5 @@
     }
   }
-  
+
   if ( !sp )
   {
@@ -256,7 +256,7 @@
     return false;
   }
-  
+
   list = ClassList::getList( CL_PLAYABLE );
-  
+
   if ( list )
   {
@@ -270,5 +270,5 @@
     }
   }
-  
+
   if ( !playable )
   {
@@ -276,7 +276,7 @@
     return false;
   }
-  
+
   sp->spawn( playable );
-  
+
   return true;
 }
