Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9399 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 24, 2006, 12:00:47 AM (18 years ago)
Author:
patrick
Message:

working on the client number < 3 bug

Location:
branches/proxy/src/lib/network
Files:
2 edited

Legend:

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

    r9397 r9399  
    719719
    720720      // server fakes uniqueid == 0 for handshake
    721       if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() ) && sync.getUniqueID() < SharedNetworkData::getInstance()->getMaxPlayer() - 1 )
     721      if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() ) &&
     722             sync.getUniqueID() < SharedNetworkData::getInstance()->getMaxPlayer() - 1 )
    722723        n = Converter::intToByteArray( 0, buf + offset, UDP_PACKET_SIZE - offset );
    723724      else
     
    865866        for ( SynchronizeableList::iterator it = synchronizeables.begin(); it != synchronizeables.end(); it++ )
    866867        {
    867         //                                        client thinks his handshake has id 0!!!!!
     868          // client thinks his handshake has id 0!!!!!
    868869          if ( (*it)->getUniqueID() == uniqueId || ( uniqueId == 0 && (*it)->getUniqueID() == peer->second.userId ) )
    869870          {
  • branches/proxy/src/lib/network/proxy/network_settings.cc

    r9398 r9399  
    8888
    8989  // set the new unique id offset
     90  // setUniqueID( maxCon+2 ) because we need one id for every handshake
     91  // and one for handshake to reject client maxCon+1
    9092  SharedNetworkData::getInstance()->setNewUniqueID( this->maxPlayer + 2);
    9193}
Note: See TracChangeset for help on using the changeset viewer.