Changeset 9257 in orxonox.OLD for branches/proxy/src/lib/network/shared_network_data.h
- Timestamp:
- Jul 12, 2006, 5:10:09 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/shared_network_data.h
r6695 r9257 8 8 9 9 #include "base_object.h" 10 #include "netdefs.h" 10 11 11 12 … … 25 26 26 27 /** @returns the next uniqueID free for an object */ 27 inline int getNewUniqueID() { return ( this-> bGameServer)?this->newUniqueID++:-1; }28 inline int getNewUniqueID() { return ( this->nodeType != NET_CLIENT)?this->newUniqueID++:-1; } 28 29 29 /** @returns true is this node is a game server */ 30 inline bool isGameServer() { return this->bGameServer; } 30 /** @returns true is this node is a master server */ 31 inline bool isMasterServer() { return this->nodeType == NET_MASTER_SERVER; } 32 /** @returns true is this node is a proxy server */ 33 inline bool isProxyServer() { return this->nodeType == NET_PROXY_SERVER; } 34 /** @returns true is this node is a client*/ 35 inline bool isClient() { return this->nodeType == NET_CLIENT; } 31 36 /** sets the game server flag @param bGameServer true if it is a game server */ 32 inline void set GameServer(bool bGameServer) { this->bGameServer = bGameServer; }37 inline void setNodeType(int nodeType) { this->nodeType = nodeType; } 33 38 34 39 /** @returns the hostID of the node */ … … 49 54 private: 50 55 int newUniqueID; //!< next uniqueID 51 bool bGameServer; //!< true if it is a server 56 int nodeType; //!< saves the node type here 57 52 58 int hostID; //!< The Host-ID of the Manager 53 59 NetworkStream* defaultSyncStream; //!< default synchronize NetworkStream
Note: See TracChangeset
for help on using the changeset viewer.