- Timestamp:
- Jul 24, 2006, 10:05:52 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/monitor/network_monitor.cc
r9400 r9404 33 33 SHELL_COMMAND(showGUI, NetworkMonitor, showGUI); 34 34 SHELL_COMMAND(hideGUI, NetworkMonitor, hideGUI); 35 // SHELL_COMMAND(output, MappedWater, saveParams);35 SHELL_COMMAND(debug, NetworkMonitor, debug); 36 36 37 37 … … 106 106 if( *it == node) 107 107 { 108 if( node->getNodeType() == NET_CLIENT) 109 this->playerNumber--; 110 108 111 this->nodeList.erase(it); 109 this->playerNumber--;110 112 return; 111 113 } -
branches/proxy/src/lib/network/monitor/network_monitor.h
r9396 r9404 65 65 inline int getPlayerNumber() { return this->playerNumber; } 66 66 67 /** @returns true if there are still free network slots available */67 /** @returns true if there are still free network slots available at the local node*/ 68 68 inline bool gotFreeSlots() { return (this->localNode->getPlayerNumber() < SharedNetworkData::getInstance()->getMaxPlayer())?true:false; } 69 69 /** @param node node to be checked for slots @returns true if there are still free network slots available at this node */ … … 89 89 90 90 int playerNumber; //!< total number of players in the game 91 int connectionNumber; //!< total number of connections at this localhost 91 92 }; 92 93 -
branches/proxy/src/lib/network/monitor/network_node.cc
r9347 r9404 43 43 this->clientList.push_back(node); 44 44 this->playerNumber++; 45 this->connectionNumber++; 45 46 } 46 47 … … 51 52 { 52 53 this->activeProxyServerList.push_back(node); 53 this-> playerNumber++;54 this->connectionNumber++; 54 55 } 55 56 -
branches/proxy/src/lib/network/monitor/network_node.h
r9396 r9404 59 59 private: 60 60 int playerNumber; //!< localy direct connected player number 61 int connectionNumber; //!< number of connections ( can but musn't be equal players) 61 62 PeerInfo* peerInfo; //!< the peer informationa about this node 62 63 -
branches/proxy/src/lib/network/network_manager.cc
r9398 r9404 105 105 int NetworkManager::createMasterServer(unsigned int port) 106 106 { 107 // init the proxy settings data do this before everything else is done here108 NetworkSettings::getInstance()->loadData();109 110 107 // create the network stream 111 108 this->networkStream = new NetworkStream(NET_MASTER_SERVER); -
branches/proxy/src/lib/network/network_stream.cc
r9402 r9404 720 720 // server fakes uniqueid == 0 for handshake 721 721 if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() ) && 722 sync.getUniqueID() <= SharedNetworkData::getInstance()->getMaxPlayer() )722 sync.getUniqueID() <= SharedNetworkData::getInstance()->getMaxPlayer() + 1) // plus one to handle one client more than the max to redirect it 723 723 n = Converter::intToByteArray( 0, buf + offset, UDP_PACKET_SIZE - offset ); 724 724 else
Note: See TracChangeset
for help on using the changeset viewer.