Changeset 9494 in orxonox.OLD for trunk/src/lib/network/shared_network_data.h
- Timestamp:
- Jul 27, 2006, 10:44:28 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/network/shared_network_data.h
r9406 r9494 14 14 #define NET_MAX_CONNECTIONS 2 15 15 16 class NetworkStream; 16 17 17 class Synchronizeable; 18 18 … … 28 28 29 29 /** @returns the next uniqueID free for an object */ 30 inline int getNewUniqueID() { return ( this->nodeType != NET_CLIENT)?this->newUniqueID++:-1; }30 inline int getNewUniqueID() { return ( isMasterServer())?this->newUniqueID++:-1; } 31 31 /** sets the @param newUniqueID: the new offset for the next unique id */ 32 32 inline void setNewUniqueID(int newUniqueID) { this->newUniqueID = newUniqueID; } 33 33 34 /** sets the game server flag @param bGameServer true if it is a game server */ 35 inline void setNodeType(int nodeType) { this->nodeType = nodeType; } 34 36 /** @returns true is this node is a master server */ 35 37 inline bool isMasterServer() { return this->nodeType == NET_MASTER_SERVER; } 36 38 /** @returns true is this node is a proxy server */ 37 inline bool isProxyServer () { return this->nodeType == NET_PROXY_SERVER_ACTIVE; }39 inline bool isProxyServerActive() { return this->nodeType == NET_PROXY_SERVER_ACTIVE; } 38 40 /** @returns true is this node is a client*/ 39 41 inline bool isClient() { return this->nodeType == NET_CLIENT; } 40 /** sets the game server flag @param bGameServer true if it is a game server */ 41 inline void setNodeType(int nodeType) { this->nodeType = nodeType; } 42 43 /** @return true if this user is connected to the local host */ 44 bool isUserLocal( int userID); 45 /** @returns true if this user is a master server */ 46 bool isUserMasterServer( int userID ); 47 /** @returns true if this user is a proxy server */ 48 bool isUserProxyServerActive( int userID ); 49 /** @returns true if this user is a client */ 50 bool isUserClient( int userID ); 51 42 52 43 53 /** @returns the maximum number of players for this server */
Note: See TracChangeset
for help on using the changeset viewer.