Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9059 in orxonox.OLD for trunk/src/lib/network/network_manager.cc


Ignore:
Timestamp:
Jul 3, 2006, 6:30:42 PM (19 years ago)
Author:
patrick
Message:

merged the network branche with the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/network/network_manager.cc

    r8708 r9059  
    5252  /* initialize the references */
    5353  this->networkStream = NULL;
    54   this->sharedNetworkData = SharedNetworkData::getInstance();
    5554  this->elapsedTime = 0.0f;
    5655 
     
    7069NetworkManager::~NetworkManager()
    7170{
     71  PRINTF(0)("NetworkManager destructor\n");
    7272  if ( this->networkStream )
    7373  {
     
    7575    this->networkStream = NULL;
    7676  }
     77 
     78  NetworkManager::singletonRef = NULL;
    7779}
    7880
     
    103105{
    104106  this->networkStream = new NetworkStream( name, port );
    105   this->sharedNetworkData->setDefaultSyncStream(this->networkStream);
     107  SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
    106108  this->networkStream->startHandshake();
    107109  return 1;
     
    115117int NetworkManager::createServer(unsigned int port)
    116118{
    117   this->sharedNetworkData->setHostID(0);
    118   this->sharedNetworkData->setGameServer(true);
     119  SharedNetworkData::getInstance()->setHostID(0);
     120  SharedNetworkData::getInstance()->setGameServer(true);
    119121  this->networkStream = new NetworkStream(port);
    120   this->sharedNetworkData->setDefaultSyncStream(this->networkStream);
     122  SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
    121123  this->networkStream->createNetworkGameManager();
    122124  PRINTF(0)("CREATE SERVER\n");
     
    144146  this->elapsedTime = 0.0f;
    145147
    146 //  if ( networkStream->isActive() )
     148  if ( networkStream )
    147149    networkStream->processData();
    148150 
Note: See TracChangeset for help on using the changeset viewer.