Changeset 9398 in orxonox.OLD for branches/proxy/src/lib/network
- Timestamp:
- Jul 23, 2006, 11:43:27 PM (19 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_manager.cc
r9396 r9398 126 126 int NetworkManager::createProxyServer(unsigned int port) 127 127 { 128 // init the proxy settings data do this before everything else is done here129 NetworkSettings::getInstance()->loadData();130 131 128 // create the network stream 132 129 this->networkStream = new NetworkStream(NET_PROXY_SERVER_ACTIVE); -
branches/proxy/src/lib/network/proxy/network_settings.cc
r9397 r9398 17 17 18 18 #include "network_settings.h" 19 19 20 #include "netdefs.h" 21 #include "shared_network_data.h" 20 22 21 23 #include "loading/resource_manager.h" … … 38 40 // suggest a good standard max players value 39 41 this->maxPlayer = 10; 42 43 this->loadData(); 40 44 } 41 45 … … 82 86 83 87 this->loadNetworkSettings( root); 88 89 // set the new unique id offset 90 SharedNetworkData::getInstance()->setNewUniqueID( this->maxPlayer + 2); 84 91 } 85 92 … … 120 127 } 121 128 129 122 130 /** 123 131 * sets the proxy address to … … 126 134 void NetworkSettings::setProxyAddr(const std::string& proxyAddr) 127 135 { 136 137 if( !SharedNetworkData::getInstance()->isMasterServer()) 138 return; 139 128 140 IPaddress *ip = new IPaddress; 129 141 -
branches/proxy/src/lib/network/shared_network_data.cc
r9396 r9398 40 40 // setUniqueID( maxCon+2 ) because we need one id for every handshake 41 41 // and one for handshake to reject client maxCon+1 42 this->newUniqueID = NetworkSettings::getInstance()->getMaxPlayer() +2;42 this->newUniqueID = 2; 43 43 } 44 44 -
branches/proxy/src/lib/network/shared_network_data.h
r9396 r9398 29 29 /** @returns the next uniqueID free for an object */ 30 30 inline int getNewUniqueID() { return ( this->nodeType != NET_CLIENT)?this->newUniqueID++:-1; } 31 /** sets the @param newUniqueID: the new offset for the next unique id */ 32 inline void setNewUniqueID(int newUniqueID) { this->newUniqueID = newUniqueID; } 31 33 32 34 /** @returns true is this node is a master server */
Note: See TracChangeset
for help on using the changeset viewer.