Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 18, 2010, 12:05:57 AM (15 years ago)
Author:
scheusso
Message:

further traffic reduction:

  • synchronisableheaders are now smaller( by 2 bytes per header )
  • variableID of SynchronisableVariables are now uint8_t → max 256 synchronised variables per Synchronisable
File:
1 edited

Legend:

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

    r6449 r6450  
    190190//       packet::Gamestate* gs = new packet::Gamestate(*gamestate);
    191191//     packet::Gamestate* gs = gamestate;
    192     packet::Gamestate *gs = new packet::Gamestate(*gamestate);
     192    packet::Gamestate *gs = new packet::Gamestate(*gamestate); //TODO: is this neccessary ?
    193193//     packet::Gamestate *gs = new packet::Gamestate();
    194194//     gs->collectData( id_, 0x1 );
     
    201201    if(base)
    202202    {
    203 
    204 //       COUT(3) << "diffing" << std::endl;
    205 //       packet::Gamestate* gs1  = gs;
    206       packet::Gamestate *diffed = gs->diff(base);
    207       if( diffed->getDataSize() == 0 )
     203      packet::Gamestate *diffed1 = gs->diffVariables(base);
     204      if( diffed1->getDataSize() == 0 )
    208205      {
    209         delete diffed;
     206        delete diffed1;
    210207        destgamestate = 0;
    211208        return;
    212209      }
    213       else
    214         gs = diffed;
    215       //packet::Gamestate *gs2 = diffed->undiff(gs);
    216 //       assert(*gs == *gs2);
    217 //       packet::Gamestate* gs2 = gs->undiff(client);
    218 //       gs = new packet::Gamestate(*gs);
    219 //       assert(*gs1==*gs2);
    220     }
    221     else{
     210      gs = diffed1;
     211    }
     212    else
     213    {
    222214      gs = new packet::Gamestate(*gs);
    223215    }
Note: See TracChangeset for help on using the changeset viewer.