- Timestamp:
- Jul 26, 2006, 3:14:17 PM (19 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/message_manager.h
r9491 r9492 40 40 enum RecieverType 41 41 { 42 RT_ALL_BUT_ME = 1, //!< message is sent to all users 42 RT_ALL_BUT_ME = 1, //!< message is sent to all users but myself 43 43 RT_ALL_ME, //!< message is sent to all users 44 44 RT_USER, //!< message is only sent to reciever -
branches/proxy/src/lib/network/network_game_manager.cc
r9491 r9492 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() || 171 SharedNetworkData::getInstance()->isProxyServerActive() && SharedNetworkData::getInstance()->isUserClient(userId)) 171 172 { 172 173 PRINTF(2)("Recieved DeleteSynchronizeable message from client %d!\n", userId); -
branches/proxy/src/lib/network/shared_network_data.cc
r9409 r9492 19 19 #include "netdefs.h" 20 20 #include "state.h" 21 22 #include "network_stream.h" 21 23 22 24 #include "debug.h" … … 51 53 SharedNetworkData::singletonRef = NULL; 52 54 } 55 56 57 58 /** @return true if this user is connected to the local host */ 59 bool SharedNetworkData::isUserLocal( int userID) 60 { 61 return this->defaultSyncStream->isUserLocal(userID); 62 } 63 64 65 /** @returns true if this user is a master server */ 66 bool SharedNetworkData::isUserMasterServer( int userID ) 67 { 68 return this->defaultSyncStream->isUserMasterServer(userID); 69 } 70 71 72 /** @returns true if this user is a proxy server */ 73 bool SharedNetworkData::isUserProxyServerActive( int userID ) 74 { 75 return this->defaultSyncStream->isUserProxyServerActive(userID); 76 } 77 78 79 /** @returns true if this user is a client */ 80 bool SharedNetworkData::isUserClient( int userID ) 81 { 82 return this->defaultSyncStream->isUserClient(userID); 83 } -
branches/proxy/src/lib/network/shared_network_data.h
r9470 r9492 14 14 #define NET_MAX_CONNECTIONS 2 15 15 16 class NetworkStream; 16 17 17 class Synchronizeable; 18 18 … … 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; } … … 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.