Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2008, 11:53:19 AM (17 years ago)
Author:
scheusso
Message:

some enhanced enet usage (gamestates are not reliable anymore - we hope to get a latency reduction)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/merge/src/network/GameStateClient.cc

    r1333 r1355  
    4747    COUT(5) << "this: " << this << std::endl;
    4848    last_diff_=0;
     49    last_gamestate_=GAMESTATEID_INITIAL-1;
    4950  }
    5051
     
    5657    printGameStateMap();
    5758    GameState *gs, *reference;
     59    /*if(compstate->id<last_gamestate_){
     60      // network packets got messed up
     61      COUT(3) << "received an obsolete gamestate" << std::endl;
     62      return false;
     63    }*/
    5864    if(compstate->diffed && compstate->base_id!=GAMESTATEID_INITIAL){
    5965      std::map<int, GameState*>::iterator it = gameStateMap.find(compstate->base_id);
     
    7783        COUT(4) << "adding decoded gs with id: " << gs->id << " diffed from: " << gs->base_id << std::endl;
    7884        last_diff_=gs->base_id;
     85        //last_gamestate_=gs->id;
    7986        return true;
    8087      }else{
     
    149156          Synchronisable *no = dynamic_cast<Synchronisable *>(id->fabricate());
    150157          COUT(4) << "loadsnapshot: classid: " << sync.classID << " objectID: " << sync.objectID << " length: " << sync.length << std::endl;
     158          if(!no){
     159            COUT(2) << "coudl not frabricate classid: " << sync.classID << " objectID: " << sync.objectID << " identifier: " << id << std::endl;
     160            break;
     161          }
    151162          no->objectID=sync.objectID;
    152163          no->classID=sync.classID;
Note: See TracChangeset for help on using the changeset viewer.