Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2490


Ignore:
Timestamp:
Dec 16, 2008, 10:12:32 PM (16 years ago)
Author:
scheusso
Message:

some cleanup and fix concerning trafficcontrol (cutting gamestates)

Location:
code/branches/presentation/src/network/packet
Files:
2 edited

Legend:

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

    r2485 r2490  
    100100      COUT(3) << "G.St.Man: need additional memory" << std::endl;
    101101      ObjectList<Synchronisable>::iterator temp = it;
    102       int addsize=tempsize;
     102      uint32_t addsize=tempsize;
    103103      while(++temp)
    104104        addsize+=temp->getSize(id, mode);
     
    399399    newobjectheader = (synchronisableHeader*)newdata;
    400400    if ( (*it).objSize == 0 )
     401    {
     402      ++it;
    401403      continue;
     404    }
    402405//     object = Synchronisable::getSynchronisable( (*it).objID );
    403406//     assert(object->objectID == oldobjectheader->objectID);
     
    418421//     origdata += objectsize;
    419422  }
     423#ifndef NDEBUG
     424  uint32_t origsize = destsize;
     425  while ( origsize < HEADER->datasize )
     426  {
     427    oldobjectheader = (synchronisableHeader*)origdata;
     428    objectsize = oldobjectheader->size;
     429    origdata += objectsize;
     430    origsize += objectsize;
     431  }
     432  assert(origsize==HEADER->datasize);
     433  assert(destsize!=0);
     434#endif
    420435  ((GamestateHeader*)gdata)->datasize = destsize;
    421   assert(destsize==HEADER->datasize);
    422   assert(destsize!=0);
    423436  return gs;
    424437}
  • code/branches/presentation/src/network/packet/Welcome.h

    r2171 r2490  
    4242{
    4343public:
    44   Welcome( unsigned int clientID, unsigned int shipID );
    45   Welcome( uint8_t* data, unsigned int clientID );
     44  Welcome( uint32_t clientID, uint32_t shipID );
     45  Welcome( uint8_t* data, uint32_t clientID );
    4646  virtual ~Welcome();
    4747
Note: See TracChangeset for help on using the changeset viewer.