Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2010, 8:54:00 PM (14 years ago)
Author:
scheusso
Message:

a lot of changes:

  • some fixes (mostly gamestate:diff)
  • FunctionCall buffering (if Gamestate is not recent enough)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network5/src/libraries/network/GamestateManager.cc

    r7758 r7759  
    258258    return true;
    259259  }
     260 
     261  uint32_t GamestateManager::getLastProcessedGamestateID(unsigned int clientID)
     262  {
     263    assert( this->lastProcessedGamestateID_.find(clientID) != this->lastProcessedGamestateID_.end() );
     264    if( this->lastProcessedGamestateID_.find(clientID) != this->lastProcessedGamestateID_.end() )
     265      return this->lastProcessedGamestateID_[clientID];
     266    else
     267      return GAMESTATEID_INITIAL;
     268  }
    260269
    261270  void GamestateManager::removeClient(ClientInformation* client){
     
    277286    }
    278287    assert(!gs->isDiffed());
    279     return gs->spreadData(0x1);
     288    if( gs->spreadData(0x1) )
     289    {
     290      this->lastProcessedGamestateID_[gs->getClientID()] = gs->getID();
     291      return true;
     292    }
     293    else
     294      return false;
    280295  }
    281296
Note: See TracChangeset for help on using the changeset viewer.