Changeset 9476 in orxonox.OLD for branches/proxy/src
- Timestamp:
- Jul 25, 2006, 11:35:11 PM (18 years ago)
- Location:
- branches/proxy/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_game_manager.cc
r9470 r9476 91 91 bool NetworkGameManager::signalNewPlayer( int userId ) 92 92 { 93 assert( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/);93 assert( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()); 94 94 assert( State::getGameRules() ); 95 95 assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) ); … … 168 168 bool NetworkGameManager::delSynchronizeableHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId ) 169 169 { 170 if ( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/)170 if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) 171 171 { 172 172 PRINTF(2)("Recieved DeleteSynchronizeable message from client %d!\n", userId); … … 229 229 bool NetworkGameManager::preferedTeamHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId ) 230 230 { 231 assert( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/);231 assert( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()); 232 232 233 233 int teamId = 0; … … 261 261 void NetworkGameManager::prefereTeam( int teamId ) 262 262 { 263 if ( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/)263 if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) 264 264 setPreferedTeam( SharedNetworkData::getInstance()->getHostID(), teamId ); 265 265 else … … 305 305 { 306 306 PRINTF(0)("NetworkGameManager::chatMessageHandler %d %d\n", userId, SharedNetworkData::getInstance()->getHostID() ); 307 if ( (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/) && userId != SharedNetworkData::getInstance()->getHostID() )307 if ( (SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) && userId != SharedNetworkData::getInstance()->getHostID() ) 308 308 { 309 309 MessageManager::getInstance()->sendMessage( messageId, data, dataLength, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH ); … … 347 347 assert( Converter::stringToByteArray(message, buf+2*INTSIZE, message.length()+INTSIZE) == message.length()+INTSIZE ); 348 348 349 if ( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/)349 if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) 350 350 MessageManager::getInstance()->sendMessage( MSGID_CHATMESSAGE, buf, message.length()+3*INTSIZE, RT_ALL_ME, 0, MP_HIGHBANDWIDTH ); 351 351 else -
branches/proxy/src/lib/network/network_manager.cc
r9475 r9476 133 133 this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE ); 134 134 // first connect to the master server for synchronization 135 this->networkStream->connectToMasterServer(NetworkSettings::getInstance()->getMasterAddr().ipString(), 10000);135 // this->networkStream->connectToMasterServer(NetworkSettings::getInstance()->getMasterAddr().ipString(), 10000); 136 136 // start the handshake with the master server 137 this->networkStream->startHandshake(NET_ID_MASTER_SERVER);137 // this->networkStream->startHandshake(NET_ID_MASTER_SERVER); 138 138 139 139 … … 146 146 147 147 // start the network game manager 148 //this->networkStream->createNetworkGameManager();148 this->networkStream->createNetworkGameManager(); 149 149 150 150 -
branches/proxy/src/lib/network/network_stream.cc
r9474 r9476 228 228 void NetworkStream::createServer(int clientPort, int proxyPort) 229 229 { 230 this->proxySocket = new UdpServerSocket(clientPort); 231 this->clientSocket= new UdpServerSocket(proxyPort); 230 PRINTF(0)(" Creating new Server: listening for clients on port %i and for proxies on port %i", clientPort, proxyPort); 231 this->clientSocket= new UdpServerSocket(clientPort); 232 this->proxySocket = new UdpServerSocket(proxyPort); 232 233 } 233 234 -
branches/proxy/src/story_entities/multi_player_world_data.cc
r9466 r9476 112 112 const TiXmlElement* element = NULL; 113 113 114 if( SharedNetworkData::getInstance()->isMasterServer() )114 if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) 115 115 { 116 116 /* load the spawning points */ … … 148 148 element = element->FirstChildElement(); 149 149 150 if( SharedNetworkData::getInstance()->isMasterServer() )150 if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) 151 151 { 152 152 while( element != NULL) … … 206 206 207 207 208 if( SharedNetworkData::getInstance()->isMasterServer() )208 if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) 209 209 { 210 210 this->localPlayer = new Player(); … … 284 284 285 285 // create server playable 286 if ( SharedNetworkData::getInstance()->isMasterServer() )286 if ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()) 287 287 { 288 288 NetworkGameManager::getInstance()->signalNewPlayer( 0 );
Note: See TracChangeset
for help on using the changeset viewer.