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/ClientInformation.cc

    r1318 r1355  
    5151    preve=0;
    5252    nexte=0;
     53    partialGamestateID_=GAMESTATEID_INITIAL-1;
    5354    this->head_=false;
    5455    synched_=false;
     
    5960    preve=0;
    6061    nexte=0;
     62    partialGamestateID_=GAMESTATEID_INITIAL-1;
    6163    this->head_=head;
    6264    synched_=false;
     
    159161    return true;
    160162  }
     163 
     164  bool ClientInformation::setPartialGamestateID(int id){
     165    boost::recursive_mutex::scoped_lock lock(mutex_);
     166    if(!this)
     167      return false;
     168    partialGamestateID_=id;
     169    return true;
     170  }
    161171
    162172  int ClientInformation::getID() {
     
    203213    if(this)
    204214      return gamestateID_;
     215    else
     216      return -1;
     217  }
     218 
     219  int ClientInformation::getPartialGamestateID() {
     220    boost::recursive_mutex::scoped_lock lock(mutex_);
     221    if(this)
     222      return partialGamestateID_;
    205223    else
    206224      return -1;
Note: See TracChangeset for help on using the changeset viewer.