Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9405 in orxonox.OLD


Ignore:
Timestamp:
Jul 24, 2006, 10:52:34 AM (18 years ago)
Author:
patrick
Message:

found server bug: initialization order inconsistency

Location:
branches/proxy/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/network_manager.cc

    r9404 r9405  
    105105int NetworkManager::createMasterServer(unsigned int port)
    106106{
     107  // load the network settings
     108  NetworkSettings::getInstance()->loadData();
     109
    107110  // create the network stream
    108111  this->networkStream = new NetworkStream(NET_MASTER_SERVER);
     
    123126int NetworkManager::createProxyServer(unsigned int port)
    124127{
     128  // load the network settings
     129  NetworkSettings::getInstance()->loadData();
     130
    125131  // create the network stream
    126132  this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE);
     
    148154int NetworkManager::createClient(const std::string & name, unsigned int port)
    149155{
     156  // load the network settings
     157  NetworkSettings::getInstance()->loadData();
     158
    150159  // create the network stream
    151160  this->networkStream = new NetworkStream(NET_CLIENT);
  • branches/proxy/src/lib/network/network_stream.cc

    r9404 r9405  
    8080      // init the shared network data
    8181      SharedNetworkData::getInstance()->setHostID(0);
    82       SharedNetworkData::getInstance()->setNodeType(NET_MASTER_SERVER);
     82//       SharedNetworkData::getInstance()->setNodeType(NET_MASTER_SERVER);
    8383      break;
    8484
     
    8686      // init the shared network data
    8787      SharedNetworkData::getInstance()->setHostID(0);
    88       SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_ACTIVE);
     88//       SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_ACTIVE);
    8989      break;
    9090    case NET_PROXY_SERVER_PASSIVE:
    9191            // init the shared network data
    9292      SharedNetworkData::getInstance()->setHostID(0);
    93       SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_PASSIVE);
     93//       SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_PASSIVE);
    9494      break;
    9595    case NET_CLIENT:
    96       SharedNetworkData::getInstance()->setNodeType(NET_CLIENT);
     96//       SharedNetworkData::getInstance()->setNodeType(NET_CLIENT);
    9797      break;
    9898  }
     
    380380          clientId = it->first + 1;
    381381    }
    382 
    383382    peers[clientId].socket = tempNetworkSocket;
     383
     384
    384385    // create new handshake and init its variables
    385     peers[clientId].handshake = new Handshake(this->pInfo->nodeType, clientId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID() );
     386    peers[clientId].handshake = new Handshake(this->pInfo->nodeType, clientId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID());
    386387    peers[clientId].handshake->setUniqueID(clientId);
    387388
     
    403404
    404405    // check if the connecting client should reconnect to a proxy server
    405     peers[clientId].handshake->setRedirect(this->networkMonitor->isReconnectNextClient());
     406    peers[clientId].handshake->setRedirect(/*this->networkMonitor->isReconnectNextClient()*/false);
    406407
    407408    // the connecting node of course is a client
  • branches/proxy/src/lib/network/proxy/network_settings.cc

    r9399 r9405  
    4141  this->maxPlayer = 10;
    4242
    43   this->loadData();
     43//   this->loadData();
    4444}
    4545
  • branches/proxy/src/orxonox.cc

    r9398 r9405  
    306306  std::string gameType = Preferences::getInstance()->getString( "game", "gameType", "" );
    307307
    308   if( gameType == "multiplayer_client") // we are a client
    309   {
     308  if( gameType == "multiplayer_client")
     309  {    // we are a client
    310310    State::setOnline(true);
    311311    SharedNetworkData::getInstance()->setNodeType(NET_CLIENT);
Note: See TracChangeset for help on using the changeset viewer.