Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9041 in orxonox.OLD for branches/multi_player_map/src/lib


Ignore:
Timestamp:
Jul 3, 2006, 3:30:01 PM (18 years ago)
Author:
rennerc
Message:

bug—

Location:
branches/multi_player_map/src/lib/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/multi_player_map/src/lib/network/network_manager.cc

    r8708 r9041  
    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  {
     
    103103{
    104104  this->networkStream = new NetworkStream( name, port );
    105   this->sharedNetworkData->setDefaultSyncStream(this->networkStream);
     105  SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
    106106  this->networkStream->startHandshake();
    107107  return 1;
     
    115115int NetworkManager::createServer(unsigned int port)
    116116{
    117   this->sharedNetworkData->setHostID(0);
    118   this->sharedNetworkData->setGameServer(true);
     117  SharedNetworkData::getInstance()->setHostID(0);
     118  SharedNetworkData::getInstance()->setGameServer(true);
    119119  this->networkStream = new NetworkStream(port);
    120   this->sharedNetworkData->setDefaultSyncStream(this->networkStream);
     120  SharedNetworkData::getInstance()->setDefaultSyncStream(this->networkStream);
    121121  this->networkStream->createNetworkGameManager();
    122122  PRINTF(0)("CREATE SERVER\n");
  • branches/multi_player_map/src/lib/network/network_manager.h

    r8228 r9041  
    4040
    4141    /** Returns the hostID @return The hostID of the object */
    42     inline int getHostID() { return this->sharedNetworkData->getHostID(); }
    43     inline bool isGameServer() { return this->sharedNetworkData->isGameServer(); }
     42    inline int getHostID() { return SharedNetworkData::getInstance()->getHostID(); }
     43    inline bool isGameServer() { return SharedNetworkData::getInstance()->isGameServer(); }
    4444
    4545
     
    5858    NetworkStream*                   networkStream;       //!< pointer to network stream
    5959
    60     SharedNetworkData*               sharedNetworkData;       //!< reference to the shared data
    6160    float                            elapsedTime;             //!< elapsed time since the last network update
    6261};
  • branches/multi_player_map/src/lib/network/network_stream.cc

    r8623 r9041  
    111111    serverSocket = NULL;
    112112  }
    113 
    114113  for ( PeerList::iterator i = peers.begin(); i!=peers.end(); i++)
    115114  {
     
    133132    }
    134133  }
    135  
    136134  for ( SynchronizeableList::const_iterator it = getSyncBegin(); it != getSyncEnd(); it ++ )
    137135    (*it)->setNetworkStream( NULL );
Note: See TracChangeset for help on using the changeset viewer.