Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 18, 2006, 2:10:11 PM (18 years ago)
Author:
patrick
Message:

network: network manager now runs with its own frequency

File:
1 edited

Legend:

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

    r7540 r7680  
    5252  this->defaultSyncStream = NULL;
    5353  this->sharedNetworkData = SharedNetworkData::getInstance();
     54  this->elapsedTime = 0.0f;
    5455
    5556  PRINTF(0)("NetworkManager created\n");
     
    123124/**
    124125 *  sync the network
     126 *  @param dtS: the seceonds elapsed since the last synchronize call
    125127 */
    126 void NetworkManager::synchronize()
     128void NetworkManager::synchronize( float dtS)
    127129{
     130  this->elapsedTime += dtS;
     131  if( likely(this->elapsedTime < 1.0f / NETWORK_FREQUENCY))
     132    return;
     133  this->elapsedTime = 0.0f;
     134
    128135  if (this->netStreamList != NULL || (this->netStreamList = ClassList::getList(CL_NETWORK_STREAM)) != NULL)
    129136  {
Note: See TracChangeset for help on using the changeset viewer.