Changeset 9521 in orxonox.OLD for branches/proxy/src/lib/network/network_game_manager.cc
- Timestamp:
- Jul 27, 2006, 7:51:06 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_game_manager.cc
r9508 r9521 166 166 * @return true on successfull handling else handler will be called again 167 167 */ 168 bool NetworkGameManager::delSynchronizeableHandler( MessageType messageType, byte * data, int dataLength, void * someData, int userId)168 bool NetworkGameManager::delSynchronizeableHandler( MessageType messageType, byte * data, int dataLength, void * someData, int senderId, int destinationId ) 169 169 { 170 170 … … 172 172 173 173 if ( SharedNetworkData::getInstance()->isMasterServer() || 174 SharedNetworkData::getInstance()->isProxyServerActive() && SharedNetworkData::getInstance()->isUserClient( userId))175 { 176 PRINTF(0)("Recieved DeleteSynchronizeable message from client %d!\n", userId);174 SharedNetworkData::getInstance()->isProxyServerActive() && SharedNetworkData::getInstance()->isUserClient(senderId)) 175 { 176 PRINTF(0)("Recieved DeleteSynchronizeable message from client %d!\n", senderId); 177 177 return true; 178 178 } … … 183 183 if ( len != dataLength ) 184 184 { 185 PRINTF(2)("Recieved DeleteSynchronizeable message with incorrect size (%d) from client %d!\n", dataLength, userId);185 PRINTF(2)("Recieved DeleteSynchronizeable message with incorrect size (%d) from client %d!\n", dataLength, senderId); 186 186 return true; 187 187 } … … 231 231 * @return 232 232 */ 233 bool NetworkGameManager::preferedTeamHandler( MessageType messageType, byte * data, int dataLength, void * someData, int userId)233 bool NetworkGameManager::preferedTeamHandler( MessageType messageType, byte * data, int dataLength, void * someData, int senderId, int destinationId ) 234 234 { 235 235 assert( SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/); … … 240 240 if ( len != dataLength ) 241 241 { 242 PRINTF(2)("Recieved DeleteSynchronizeable message with incorrect size (%d) from client %d!\n", dataLength, userId);242 PRINTF(2)("Recieved DeleteSynchronizeable message with incorrect size (%d) from client %d!\n", dataLength, senderId); 243 243 return true; 244 244 } 245 245 246 NetworkGameManager::getInstance()->setPreferedTeam( userId, teamId );246 NetworkGameManager::getInstance()->setPreferedTeam( senderId, teamId ); 247 247 248 248 return true; … … 314 314 315 315 316 bool NetworkGameManager::chatMessageHandler( MessageType messageType, byte * data, int dataLength, void * someData, int userId)317 { 318 PRINTF(0)("NetworkGameManager::chatMessageHandler %d %d\n", userId, SharedNetworkData::getInstance()->getHostID() );319 if ( (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/) && userId != SharedNetworkData::getInstance()->getHostID() )316 bool NetworkGameManager::chatMessageHandler( MessageType messageType, byte * data, int dataLength, void * someData, int senderId, int destinationId ) 317 { 318 PRINTF(0)("NetworkGameManager::chatMessageHandler %d %d\n", senderId, SharedNetworkData::getInstance()->getHostID() ); 319 if ( (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/) && senderId != SharedNetworkData::getInstance()->getHostID() ) 320 320 { 321 321 MessageManager::getInstance()->sendMessage( messageType, data, dataLength, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH ); … … 329 329 if ( dataLength < 3*INTSIZE ) 330 330 { 331 PRINTF(2)("got too small chatmessage from client %d\n", userId);331 PRINTF(2)("got too small chatmessage from client %d\n", senderId); 332 332 333 333 return true;
Note: See TracChangeset
for help on using the changeset viewer.