Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3102 for code/trunk


Ignore:
Timestamp:
May 28, 2009, 3:05:54 AM (16 years ago)
Author:
scheusso
Message:

fixed some problems when changing the gamestate (from menu to server i.e.)

Location:
code/trunk/src/network
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/GamestateClient.cc

    r2662 r3102  
    111111  packet::Gamestate *GamestateClient::getGamestate(){
    112112    packet::Gamestate *gs = new packet::Gamestate();
    113     if(!gs->collectData(0)){
     113    if(!gs->collectData(0,0x2)){
    114114      delete gs;
    115115      return 0;
     
    172172      COUT(5) << "successfully undiffed gamestate id: " << undiffed->getID() << std::endl;
    173173    }
    174     if(gs->spreadData())
     174    if(gs->spreadData(0x2))
    175175      return gs;
    176176    else
  • code/trunk/src/network/GamestateManager.cc

    r3084 r3102  
    102102      delete reference;
    103103    reference = new packet::Gamestate();
    104     if(!reference->collectData(++id_)){ //we have no data to send
     104    if(!reference->collectData(++id_, 0x1)){ //we have no data to send
    105105      delete reference;
    106106      reference=0;
     
    200200    }
    201201    assert(!gs->isDiffed());
    202     return gs->spreadData();
     202    return gs->spreadData(0x1);
    203203  }
    204204
  • code/trunk/src/network/Server.cc

    r3084 r3102  
    364364    packet::Gamestate *g = new packet::Gamestate();
    365365    g->setClientID(temp->getID());
    366     b = g->collectData(0);
     366    b = g->collectData(0,0x1);
    367367    if(!b)
    368368      return false; //no data for the client
  • code/trunk/src/network/synchronisable/SynchronisableVariable.h

    r3084 r3102  
    122122  template <class T> inline uint32_t SynchronisableVariable<T>::getData(uint8_t*& mem, uint8_t mode)
    123123  {
    124     if ( state_ == this->mode_ )
     124    if ( mode == this->mode_ )
    125125    {
    126126      saveAndIncrease( this->variable_, mem );
Note: See TracChangeset for help on using the changeset viewer.