Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 27, 2006, 3:37:11 PM (18 years ago)
Author:
patrick
Message:

message handler: changed some variable names - standardisations to make it better readable. added some documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/network_game_manager.cc

    r9507 r9508  
    159159/**
    160160 * handler for remove synchronizeable messages
    161  * @param messageId
     161 * @param messageType
    162162 * @param data
    163163 * @param dataLength
     
    166166 * @return true on successfull handling else handler will be called again
    167167 */
    168 bool NetworkGameManager::delSynchronizeableHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
     168bool NetworkGameManager::delSynchronizeableHandler( MessageType messageType, byte * data, int dataLength, void * someData, int userId )
    169169{
    170170
     
    224224/**
    225225 * handler for MSGID_PREFEREDTEAM message
    226  * @param messageId
     226 * @param messageType
    227227 * @param data
    228228 * @param dataLength
     
    231231 * @return
    232232 */
    233 bool NetworkGameManager::preferedTeamHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
     233bool NetworkGameManager::preferedTeamHandler( MessageType messageType, byte * data, int dataLength, void * someData, int userId )
    234234{
    235235  assert( SharedNetworkData::getInstance()->isMasterServer() /*||  SharedNetworkData::getInstance()->isProxyServerActive()*/);
     
    314314
    315315
    316 bool NetworkGameManager::chatMessageHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId )
     316bool NetworkGameManager::chatMessageHandler( MessageType messageType, byte * data, int dataLength, void * someData, int userId )
    317317{
    318318  PRINTF(0)("NetworkGameManager::chatMessageHandler %d %d\n", userId, SharedNetworkData::getInstance()->getHostID() );
    319319  if ( (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/) && userId !=  SharedNetworkData::getInstance()->getHostID() )
    320320  {
    321     MessageManager::getInstance()->sendMessage( messageId, data, dataLength, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH );
     321    MessageManager::getInstance()->sendMessage( messageType, data, dataLength, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH );
    322322  }
    323323
     
    334334  }
    335335
    336   int messageType = 0;
    337   Converter::byteArrayToInt( data, &messageType );
     336  int chatType = 0;
     337  Converter::byteArrayToInt( data, &chatType);
    338338  int senderUserId = 0;
    339339  Converter::byteArrayToInt( data+INTSIZE, &senderUserId );
     
    341341  Converter::byteArrayToString( data+2*INTSIZE, message, dataLength-2*INTSIZE );
    342342
    343   rules.handleChatMessage( senderUserId, message, messageType );
     343  rules.handleChatMessage( senderUserId, message, chatType);
    344344
    345345  return true;
Note: See TracChangeset for help on using the changeset viewer.