Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 21, 2010, 6:09:09 PM (14 years ago)
Author:
scheusso
Message:

merged network5 into presentation2 branch (untested)

Location:
code/branches/presentation2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2

  • code/branches/presentation2/src/libraries/network/synchronisable/Synchronisable.cc

    r7401 r7788  
    123123  {
    124124    SynchronisableHeader header(mem);
    125     assert( !header.isDiffed() );
     125    if( header.isDiffed() )
     126    {
     127      mem += header.getDataSize() + header.getSize();
     128      return 0;
     129    }
     130//     assert( !header.isDiffed() );
    126131
    127132    COUT(4) << "fabricating object with id: " << header.getObjectID() << std::endl;
     
    217222   * length of varx: size saved int syncvarlist
    218223   * @param mem pointer to allocated memory with enough size
    219    * @param sizes FIXME - add doc!
     224   * @param sizes vector containing sizes of all objects in gamestate (to be appended)
    220225   * @param id gamestateid of the gamestate to be saved (important for priorities)
    221226   * @param mode defines the direction in which the data will be send/received
    222227   *             0x1: server->client
    223    *             0x2: client->server (not recommended)
     228   *             0x2: client->server
    224229   *             0x3: bidirectional
    225230   * @return true: if !doSync or if everything was successfully saved
     
    265270      //tempsize += (*i)->getSize( mode );
    266271    }
     272    assert(tempsize!=0);  // if this happens an empty object (with no variables) would be transmitted
    267273//     COUT(4) << endl;
    268274
     
    316322      mem += SynchronisableHeader::getSize();
    317323      std::vector<SynchronisableVariableBase *>::iterator i;
    318       for(i=syncList_.begin(); i!=syncList_.end(); i++)
     324      for(i=syncList_.begin(); i!=syncList_.end(); ++i)
    319325      {
    320326        assert( mem <= data+syncHeader2.getDataSize()+SynchronisableHeader::getSize() ); // always make sure we don't exceed the datasize in our stream
Note: See TracChangeset for help on using the changeset viewer.