Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9491 in orxonox.OLD for branches/proxy


Ignore:
Timestamp:
Jul 26, 2006, 2:43:26 PM (18 years ago)
Author:
patrick
Message:

the clients can now connect to the proxy server and get synchronized somehow there is still some synch that needs some more work: the messages are not sent to the server as they should (since there is only proxy) and the network game rules will have to be adjusted

Location:
branches/proxy/src
Files:
5 edited

Legend:

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

    r9406 r9491  
    320320    if (
    321321         recieverType == RT_ALL_ME ||
    322          recieverType == RT_ALL_NOT_ME ||
     322         recieverType == RT_ALL_BUT_ME ||
    323323         recieverType == RT_USER && it->first == reciever ||
    324324         recieverType == RT_NOT_USER && it->first != reciever ||
    325          recieverType == RT_SERVER && getNetworkStream()->isUserMasterServer( it->first )
     325         recieverType == RT_SERVER && getNetworkStream()->isUserMasterServer( it->first ) ||
     326         recieverType == RT_SERVER && getNetworkStream()->isUserProxyServerActive( it->first )
    326327       )
    327328    {
  • branches/proxy/src/lib/network/message_manager.h

    r9454 r9491  
    4040enum RecieverType
    4141{
    42   RT_ALL_NOT_ME = 1,   //!< message is sent to all users
     42  RT_ALL_BUT_ME = 1,   //!< message is sent to all users
    4343  RT_ALL_ME,           //!< message is sent to all users
    4444  RT_USER,             //!< message is only sent to reciever
  • branches/proxy/src/lib/network/network_game_manager.cc

    r9477 r9491  
    213213  assert( Converter::intToByteArray( uniqueId, buf, INTSIZE ) == INTSIZE );
    214214
    215   MessageManager::getInstance()->sendMessage( MSGID_DELETESYNCHRONIZEABLE, buf, INTSIZE, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
     215  MessageManager::getInstance()->sendMessage( MSGID_DELETESYNCHRONIZEABLE, buf, INTSIZE, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH );
    216216}
    217217
     
    307307  if ( (SharedNetworkData::getInstance()->isMasterServer() /*|| SharedNetworkData::getInstance()->isProxyServerActive()*/) && userId !=  SharedNetworkData::getInstance()->getHostID() )
    308308  {
    309     MessageManager::getInstance()->sendMessage( messageId, data, dataLength, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
     309    MessageManager::getInstance()->sendMessage( messageId, data, dataLength, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH );
    310310  }
    311311
     
    350350    MessageManager::getInstance()->sendMessage( MSGID_CHATMESSAGE, buf, message.length()+3*INTSIZE, RT_ALL_ME, 0, MP_HIGHBANDWIDTH );
    351351  else
    352     MessageManager::getInstance()->sendMessage( MSGID_CHATMESSAGE, buf, message.length()+3*INTSIZE, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
     352    MessageManager::getInstance()->sendMessage( MSGID_CHATMESSAGE, buf, message.length()+3*INTSIZE, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH );
    353353
    354354
  • branches/proxy/src/subprojects/network/network_unit_test.cc

    r9462 r9491  
    276276  for(;;)
    277277  {
    278     MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"server to client", 18, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
     278    MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"server to client", 18, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH );
    279279    netMan->synchronize( 100 );
    280280    SDL_Delay(100);
     
    323323  {
    324324    netMan->synchronize( 100 );
    325     MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"client to server", 18, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
     325    MessageManager::getInstance()->sendMessage( TESTMESSAGEID, (byte*)"client to server", 18, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH );
    326326    ss = dynamic_cast<SimpleSync*>(ClassList::getObject( "Server", CL_SIMPLE_SYNC ) );
    327327    SDL_Delay(100);
  • branches/proxy/src/world_entities/spawning_point.cc

    r9466 r9491  
    213213  assert( Converter::intToByteArray( uniqueId, buf + INTSIZE, INTSIZE ) == INTSIZE );
    214214
    215   MessageManager::getInstance()->sendMessage( MSGID_RESPAWN, buf, 2*INTSIZE, RT_ALL_NOT_ME, 0, MP_HIGHBANDWIDTH );
     215  MessageManager::getInstance()->sendMessage( MSGID_RESPAWN, buf, 2*INTSIZE, RT_ALL_BUT_ME, 0, MP_HIGHBANDWIDTH );
    216216}
    217217
Note: See TracChangeset for help on using the changeset viewer.