Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 14, 2011, 9:00:48 AM (13 years ago)
Author:
scheusso
Message:

improving gamestate processing and generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network6/src/libraries/network/Client.cc

    r7878 r7882  
    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
Note: See TracChangeset for help on using the changeset viewer.