Changeset 9405 in orxonox.OLD
- Timestamp:
- Jul 24, 2006, 10:52:34 AM (18 years ago)
- Location:
- branches/proxy/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_manager.cc
r9404 r9405 105 105 int NetworkManager::createMasterServer(unsigned int port) 106 106 { 107 // load the network settings 108 NetworkSettings::getInstance()->loadData(); 109 107 110 // create the network stream 108 111 this->networkStream = new NetworkStream(NET_MASTER_SERVER); … … 123 126 int NetworkManager::createProxyServer(unsigned int port) 124 127 { 128 // load the network settings 129 NetworkSettings::getInstance()->loadData(); 130 125 131 // create the network stream 126 132 this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE); … … 148 154 int NetworkManager::createClient(const std::string & name, unsigned int port) 149 155 { 156 // load the network settings 157 NetworkSettings::getInstance()->loadData(); 158 150 159 // create the network stream 151 160 this->networkStream = new NetworkStream(NET_CLIENT); -
branches/proxy/src/lib/network/network_stream.cc
r9404 r9405 80 80 // init the shared network data 81 81 SharedNetworkData::getInstance()->setHostID(0); 82 SharedNetworkData::getInstance()->setNodeType(NET_MASTER_SERVER);82 // SharedNetworkData::getInstance()->setNodeType(NET_MASTER_SERVER); 83 83 break; 84 84 … … 86 86 // init the shared network data 87 87 SharedNetworkData::getInstance()->setHostID(0); 88 SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_ACTIVE);88 // SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_ACTIVE); 89 89 break; 90 90 case NET_PROXY_SERVER_PASSIVE: 91 91 // init the shared network data 92 92 SharedNetworkData::getInstance()->setHostID(0); 93 SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_PASSIVE);93 // SharedNetworkData::getInstance()->setNodeType(NET_PROXY_SERVER_PASSIVE); 94 94 break; 95 95 case NET_CLIENT: 96 SharedNetworkData::getInstance()->setNodeType(NET_CLIENT);96 // SharedNetworkData::getInstance()->setNodeType(NET_CLIENT); 97 97 break; 98 98 } … … 380 380 clientId = it->first + 1; 381 381 } 382 383 382 peers[clientId].socket = tempNetworkSocket; 383 384 384 385 // 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()); 386 387 peers[clientId].handshake->setUniqueID(clientId); 387 388 … … 403 404 404 405 // 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); 406 407 407 408 // the connecting node of course is a client -
branches/proxy/src/lib/network/proxy/network_settings.cc
r9399 r9405 41 41 this->maxPlayer = 10; 42 42 43 this->loadData();43 // this->loadData(); 44 44 } 45 45 -
branches/proxy/src/orxonox.cc
r9398 r9405 306 306 std::string gameType = Preferences::getInstance()->getString( "game", "gameType", "" ); 307 307 308 if( gameType == "multiplayer_client") // we are a client309 { 308 if( gameType == "multiplayer_client") 309 { // we are a client 310 310 State::setOnline(true); 311 311 SharedNetworkData::getInstance()->setNodeType(NET_CLIENT);
Note: See TracChangeset
for help on using the changeset viewer.