Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 21, 2009, 12:27:19 AM (15 years ago)
Author:
scheusso
Message:

rest of the cleanup ( mostly client connection handling)
network is now single-threaded ( only in order to become multithreaded again, but thats another story ;) )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp5/src/network/Server.cc

    r3201 r3202  
    144144  */
    145145  void Server::update(const Clock& time) {
    146     ServerConnection::processQueue();
     146    Connection::processQueue();
    147147    gamestates_->processGamestates();
    148148    //this steers our network frequency
    149149    timeSinceLastUpdate_+=time.getDeltaTime();
    150     if(timeSinceLastUpdate_>=NETWORK_PERIOD){
     150    if(timeSinceLastUpdate_>=NETWORK_PERIOD)
     151    {
    151152      timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD;
    152153      updateGamestate();
    153154      FunctionCallManager::sendCalls();
    154155    }
     156    sendPackets(); // flush the enet queue
    155157  }
    156158
Note: See TracChangeset for help on using the changeset viewer.