Index: /branches/proxy/src/lib/collision_detection/aabb_tree_node.cc
===================================================================
--- /branches/proxy/src/lib/collision_detection/aabb_tree_node.cc	(revision 9469)
+++ /branches/proxy/src/lib/collision_detection/aabb_tree_node.cc	(revision 9470)
@@ -66,4 +66,6 @@
 {
   this->depth = depth;
+
+  this->init();
 }
 
@@ -87,10 +89,4 @@
 
   this->owner = NULL;
-
-  /* debug ids */
-  if( this->nodePrev)
-    this->treeIndex = 100 * this->depth + this->nodePrev->getID();
-  else
-    this->treeIndex = 0;
 }
 
Index: /branches/proxy/src/lib/network/network_game_manager.cc
===================================================================
--- /branches/proxy/src/lib/network/network_game_manager.cc	(revision 9469)
+++ /branches/proxy/src/lib/network/network_game_manager.cc	(revision 9470)
@@ -91,5 +91,5 @@
 bool NetworkGameManager::signalNewPlayer( int userId )
 {
-  assert( SharedNetworkData::getInstance()->isMasterServer() ||  SharedNetworkData::getInstance()->isProxyServerActive());
+  assert( SharedNetworkData::getInstance()->isMasterServer() /*||  SharedNetworkData::getInstance()->isProxyServerActive()*/);
   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() ||  SharedNetworkData::getInstance()->isProxyServerActive())
+  if ( SharedNetworkData::getInstance()->isMasterServer() /*||  SharedNetworkData::getInstance()->isProxyServerActive()*/)
   {
     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() ||  SharedNetworkData::getInstance()->isProxyServerActive());
+  assert( SharedNetworkData::getInstance()->isMasterServer() /*||  SharedNetworkData::getInstance()->isProxyServerActive()*/);
 
   int teamId = 0;
@@ -261,5 +261,5 @@
 void NetworkGameManager::prefereTeam( int teamId )
 {
-  if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive())
+  if ( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/)
     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() || SharedNetworkData::getInstance()->isProxyServerActive()) && userId !=  SharedNetworkData::getInstance()->getHostID() )
+  if ( (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/) && 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() || SharedNetworkData::getInstance()->isProxyServerActive())
+  if ( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/)
     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 9469)
+++ /branches/proxy/src/lib/network/network_manager.cc	(revision 9470)
@@ -131,5 +131,5 @@
 
   // create the network stream af
-  this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE);
+  this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE );
   // first connect to the master server for synchronization
   this->networkStream->connectToMasterServer(NetworkSettings::getInstance()->getMasterAddr().ipString(), 9999);
Index: /branches/proxy/src/lib/network/network_stream.cc
===================================================================
--- /branches/proxy/src/lib/network/network_stream.cc	(revision 9469)
+++ /branches/proxy/src/lib/network/network_stream.cc	(revision 9470)
@@ -208,5 +208,5 @@
  * @param port: the port number
  */
-void NetworkStream::connectToProxyServer(int proxyId,std::string host, int port)
+void NetworkStream::connectToProxyServer(int proxyId, std::string host, int port)
 {
   PRINTF(0)("connect to proxy %s, this is proxyId %i\n", host.c_str(), proxyId);
@@ -253,5 +253,5 @@
 void NetworkStream::startHandshake(int userId)
 {
-  Handshake* hs = new Handshake(this->pInfo->nodeType);
+  Handshake* hs = new Handshake(NET_CLIENT/* this->pInfo->nodeType*/);
   // fake the unique id
   hs->setUniqueID( NET_UID_HANDSHAKE );
@@ -323,14 +323,15 @@
     this->updateConnectionList();
   }
-  else if( this->pInfo->isProxyServerActive())
-  {
+//   else if( this->pInfo->isProxyServerActive())
+//   {
     // execute everything the proxy server should do
-    if ( this->clientSocket )
-      this->clientSocket->update();
-    if( this->proxySocket)
-      this->proxySocket->update();
-
-    this->updateConnectionList();
-  }
+
+//     if ( this->clientSocket )
+//       this->clientSocket->update();
+//     if( this->proxySocket)
+//       this->proxySocket->update();
+//
+//     this->updateConnectionList();
+//   }
   else
   {
@@ -554,5 +555,5 @@
           {
             // make sure this is a client
-            if( this->pInfo->isClient())
+            if( this->pInfo->isClient() || SharedNetworkData::getInstance()->isProxyServerActive())
             {
               SharedNetworkData::getInstance()->setHostID( it->second.handshake->getHostId() );
@@ -752,5 +753,5 @@
 
       // if we are a server (both master and proxy servers) and this is not our handshake
-      if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive() ) && sync.getLeafClassID() == CL_HANDSHAKE && sync.getUniqueID() != peer->second.userId )
+      if ( ( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/ ) && sync.getLeafClassID() == CL_HANDSHAKE && sync.getUniqueID() != peer->second.userId )
         continue;
 
@@ -766,5 +767,5 @@
 
       // server fakes uniqueid == 0 for handshake
-      if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive() ) &&
+      if ( ( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive() */) &&
              sync.getUniqueID() <= SharedNetworkData::getInstance()->getMaxPlayer() + 1) // plus one to handle one client more than the max to redirect it
         n = Converter::intToByteArray( 0, buf + offset, UDP_PACKET_SIZE - offset );
@@ -818,5 +819,5 @@
     // now compress the data with the zip library
     int compLength = 0;
-    if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive())
+    if ( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/)
       compLength = Zip::getInstance()->zip( buf, offset, compBuf, UDP_PACKET_SIZE, dictServer );
     else
@@ -936,5 +937,5 @@
 
           // 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() )
+          if ( peers[peer->second.userId].isClient() || peers[peer->second.userId].isProxyServerActive())
           {
             offset += syncDataLength;
Index: /branches/proxy/src/lib/network/peer_info.cc
===================================================================
--- /branches/proxy/src/lib/network/peer_info.cc	(revision 9469)
+++ /branches/proxy/src/lib/network/peer_info.cc	(revision 9470)
@@ -58,18 +58,4 @@
   return PeerInfo::nodeTypeToString( this->nodeType );
   // the above does the same, and is faster in it. (there is no case where node is uninit i hope!)
-/*
-  switch( this->nodeType)
-  {
-    case NET_CLIENT:
-      return std::string("client");
-    case NET_PROXY_SERVER_ACTIVE:
-      return std::string("proxy server active");
-    case NET_PROXY_SERVER_PASSIVE:
-      return std::string("proxy server passive");
-    case NET_MASTER_SERVER:
-      return std::string("master server");
-  }
-
-  return std::string("node is uninit");*/
 }
 
Index: /branches/proxy/src/lib/network/shared_network_data.h
===================================================================
--- /branches/proxy/src/lib/network/shared_network_data.h	(revision 9469)
+++ /branches/proxy/src/lib/network/shared_network_data.h	(revision 9470)
@@ -28,5 +28,5 @@
 
     /** @returns the next uniqueID free for an object */
-    inline int getNewUniqueID() { return ( this->nodeType != NET_CLIENT)?this->newUniqueID++:-1; }
+    inline int getNewUniqueID() { return ( isMasterServer())?this->newUniqueID++:-1; }
     /** sets the @param newUniqueID: the new offset for the next unique id */
     inline void setNewUniqueID(int newUniqueID) { this->newUniqueID = newUniqueID; }
Index: /branches/proxy/src/util/game_rules.cc
===================================================================
--- /branches/proxy/src/util/game_rules.cc	(revision 9469)
+++ /branches/proxy/src/util/game_rules.cc	(revision 9470)
@@ -87,5 +87,5 @@
 void GameRules::registerKill(const Kill& kill)
 {
-  if ( SharedNetworkData::getInstance()->isClient() )
+  if ( SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive())
     return;
 
Index: /branches/proxy/src/util/multiplayer_team_deathmatch.cc
===================================================================
--- /branches/proxy/src/util/multiplayer_team_deathmatch.cc	(revision 9469)
+++ /branches/proxy/src/util/multiplayer_team_deathmatch.cc	(revision 9470)
@@ -152,5 +152,5 @@
       box->setAbsCoor2D( 300, 100 );
 
-      if( SharedNetworkData::getInstance()->isClient())
+      if( SharedNetworkData::getInstance()->isClient() ||  SharedNetworkData::getInstance()->isProxyServerActive())
       {
         OrxGui::GLGuiPushButton * buttonSpectator = new OrxGui::GLGuiPushButton("Spectator");
@@ -214,5 +214,5 @@
   assignPlayable();
 
-  if ( SharedNetworkData::getInstance()->isClient() )
+  if ( SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive())
     return;
 
@@ -278,5 +278,5 @@
 void MultiplayerTeamDeathmatch::checkGameRules()
 {
-  if ( SharedNetworkData::getInstance()->isClient() )
+  if ( SharedNetworkData::getInstance()->isClient() || SharedNetworkData::getInstance()->isProxyServerActive())
     return;
 
Index: /branches/proxy/src/world_entities/creatures/fps_player.cc
===================================================================
--- /branches/proxy/src/world_entities/creatures/fps_player.cc	(revision 9469)
+++ /branches/proxy/src/world_entities/creatures/fps_player.cc	(revision 9470)
@@ -287,5 +287,5 @@
   //dealing damage
 
-  if ( State::isOnline() && (SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()))
+  if ( State::isOnline() && (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/))
   {
     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 9469)
+++ /branches/proxy/src/world_entities/space_ships/space_ship.cc	(revision 9470)
@@ -310,14 +310,5 @@
 void SpaceShip::collidesWith(WorldEntity* entity, const Vector& location)
 {
-  Playable::collidesWith(entity, location);
-
-  if( entity->isA(CL_PROJECTILE) && entity != ref)
-  {
-    if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive())
-    {
-      //TODO handle this
-    }
-  }
-  PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassCName(), entity->getClassCName(), location.x, location.y, location.z);
+
 }
 
Index: /branches/proxy/src/world_entities/world_entity.cc
===================================================================
--- /branches/proxy/src/world_entities/world_entity.cc	(revision 9469)
+++ /branches/proxy/src/world_entities/world_entity.cc	(revision 9470)
@@ -257,6 +257,9 @@
 bool WorldEntity::buildObbTree(int depth)
 {
-  if (this->obbTree)
+  if( this->obbTree != NULL)
+  {
     delete this->obbTree;
+    this->obbTree = NULL;
+  }
 
   if (this->models[0] != NULL)
@@ -280,4 +283,10 @@
     this->aabbNode = new AABBTreeNode();
     this->aabbNode->spawnBVTree(this->models[0]);
+  }
+  else
+  {
+    PRINTF(1)("could not create aabb bounding box, because no model was loaded yet\n");
+    this->aabbNode = NULL;
+    return false;
   }
   return true;
