Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 25, 2011, 8:22:36 PM (13 years ago)
Author:
scheusso
Message:

merging network6 into trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/network/Client.cc

    r7801 r8327  
    155155        COUT(4) << "popping partial gamestate: " << std::endl;
    156156//         packet::Gamestate *gs = GamestateClient::getGamestate();
    157         GamestateManager::update();
    158         std::vector<packet::Gamestate*> gamestates = GamestateManager::getGamestates();
    159         std::vector<packet::Gamestate*>::iterator it;
    160         for( it = gamestates.begin(); it != gamestates.end(); ++it )
     157        if( GamestateManager::update() )
    161158        {
    162           (*it)->send( static_cast<Host*>(this) );
     159          std::vector<packet::Gamestate*> gamestates = GamestateManager::getGamestates();
     160          std::vector<packet::Gamestate*>::iterator it;
     161          for( it = gamestates.begin(); it != gamestates.end(); ++it )
     162          {
     163            (*it)->send( static_cast<Host*>(this) );
     164          }
    163165        }
    164166        //assert(gs); <--- there might be the case that no data has to be sent, so its commented out now
     
    207209    if( packet->isReliable() )
    208210    {
    209       if( this->getLastProcessedGamestateID(packet->getPeerID()) >= packet->getRequiredGamestateID() )
     211      if( this->getLastReceivedGamestateID(packet->getPeerID()) >= packet->getRequiredGamestateID() )
    210212        packet->process(static_cast<Host*>(this));
    211213      else
Note: See TracChangeset for help on using the changeset viewer.