Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7809 in orxonox.OLD for branches/network


Ignore:
Timestamp:
May 24, 2006, 3:27:07 PM (19 years ago)
Author:
rennerc
Message:

removed zerodiff handling

Location:
branches/network/src/lib/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_stream.cc

    r7806 r7809  
    390390    for ( SynchronizeableList::iterator it = synchronizeables.begin(); it != synchronizeables.end(); it++ )
    391391    {
    392       PRINTF(0)("offset: %d\n", offset);
    393392      int oldOffset = offset;
    394393      Synchronizeable & sync = **it;
     
    427426      assert( Converter::intToByteArray( n, buf + offset - n - INTSIZE, INTSIZE ) == INTSIZE );
    428427     
    429       //check if all bytes == 0 -> remove data
    430       bool allZero = true;
    431       for ( int i = offset - n; i < offset; i++ )
    432       {
    433         if ( buf[i] != 0 )
    434           allZero = false;
    435       }
    436      
    437       if ( allZero )
    438       {
    439         NETPRINTF(n)("REMOVE ZERO DIFF: %s (%d)\n", sync.getClassName(), sync.getUniqueID());
    440         offset = oldOffset;
    441       }
    442      
    443428    }
    444429   
     
    449434    peer->second.connectionMonitor->processUnzippedOutgoingPacket( buf, offset, currentState );
    450435   
    451     assert( offset != 142 );
    452436    NETPRINTF(n)("send packet: %d userId = %d\n", offset, peer->second.userId);
    453437  }
     
    507491      while ( offset + 2*INTSIZE < length )
    508492      {
    509         NETPRINTF(n)("%d\n", length - offset);
     493        assert( offset > 0 );
    510494        assert( Converter::byteArrayToInt( buf + offset, &uniqueId ) == INTSIZE );
    511495        offset += INTSIZE;
     
    513497        assert( Converter::byteArrayToInt( buf + offset, &syncDataLength ) == INTSIZE );
    514498        offset += INTSIZE;
     499       
     500        assert( syncDataLength > 0 );
     501        assert( syncDataLength < 1000 );
    515502     
    516503        Synchronizeable * sync = NULL;
  • branches/network/src/lib/network/synchronizeable.cc

    r7793 r7809  
    262262  while ( it != recvStates[userId].end() && (*it)->stateId != fromStateId )
    263263    it++;
     264
    264265 
    265266//  if ( getLeafClassID() == CL_SPACE_SHIP )
Note: See TracChangeset for help on using the changeset viewer.