Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7337 for code/branches


Ignore:
Timestamp:
Sep 3, 2010, 3:46:21 PM (14 years ago)
Author:
scheusso
Message:

fix in gamestate diff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network3/src/libraries/network/packet/Gamestate.cc

    r7333 r7337  
    510510    assert(dest < newData + newDataSize);
    511511    assert(sizes != this->sizes_.end());
     512    bool diffedObject = false;
    512513    while ( baseData < baseDataEnd )
    513514    {
     
    519520//         goto DODIFF;
    520521        diffObject(dest, origData, baseData, h, sizes);
     522        diffedObject = true;
     523        break;
    521524      }
    522525      {
     
    529532        }
    530533      }
     534      baseData += htemp.getDataSize()+SynchronisableHeader::getSize();
    531535//       assert( baseData+htemp.getDataSize()+SynchronisableHeader::getSize() <=baseData+baseLength );
    532536//       temp += htemp.getDataSize()+SynchronisableHeader::getSize();
    533        
     537     
    534538    }
    535539    // If not found start looking at the beginning
    536     assert( baseData == baseDataEnd );
     540    assert( diffedObject || baseData == baseDataEnd );
    537541    baseData = GAMESTATE_START(base->data_);
    538542    {
     
    545549      }
    546550    }
    547     while ( baseData < baseDataEnd )
     551    while ( !diffedObject && baseData < baseDataEnd )
    548552    {
    549553      SynchronisableHeader htemp(baseData);
     
    574578      assert(sizes != this->sizes_.end() || origData>=origDataEnd);
    575579    }
    576    
    577   }
     580  }
     581  assert(sizes==this->sizes_.end());
    578582
    579583
Note: See TracChangeset for help on using the changeset viewer.