Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9374 in orxonox.OLD for branches/proxy/src/lib/network


Ignore:
Timestamp:
Jul 21, 2006, 1:12:57 AM (18 years ago)
Author:
patrick
Message:

other unique id offset

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

Legend:

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

    r9371 r9374  
    404404      it->second.socket = NULL;
    405405
     406      // remove the old connectin monitor
    406407      if ( it->second.connectionMonitor )
    407408        delete it->second.connectionMonitor;
    408409      it->second.connectionMonitor = NULL;
    409410
     411      // remove the handshake
    410412      if ( it->second.handshake )
    411413        delete it->second.handshake;
    412414      it->second.handshake = NULL;
    413415
     416      // and cleanup the user infos
    414417      for ( SynchronizeableList::iterator it2 = synchronizeables.begin(); it2 != synchronizeables.end(); it2++ )
    415418      {
     
    488491          if ( !it->second.handshake->allowDel() )
    489492          {
     493
    490494            if ( this->pInfo->nodeType == NET_CLIENT )
    491495            {
     496
    492497              SharedNetworkData::getInstance()->setHostID( it->second.handshake->getHostId() );
    493498              this->pInfo->userId = SharedNetworkData::getInstance()->getHostID();
     
    515520
    516521            PRINT(0)("handshake finished id=%d\n", it->second.handshake->getNetworkGameManagerId());
    517 
    518522            it->second.handshake->del();
    519523          }
  • branches/proxy/src/lib/network/shared_network_data.cc

    r9357 r9374  
    1818#include "shared_network_data.h"
    1919#include "netdefs.h"
     20#include "state.h"
    2021
    2122
     
    3536  this->hostID = -1;
    3637  this->defaultSyncStream = NULL;
    37   this->newUniqueID = NET_MAX_CONNECTIONS + 2;
     38
     39  if(State::isOnline())
     40    this->newUniqueID = ProxySettings::getInstance()->getMaxPlayer() + 2;
     41  else
     42    this->newUniqueID = NET_MAX_CONNECTIONS + 2;
    3843  this->nodeType = NET_CLIENT;
    3944}
Note: See TracChangeset for help on using the changeset viewer.