Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7755


Ignore:
Timestamp:
Dec 11, 2010, 4:12:21 PM (14 years ago)
Author:
scheusso
Message:

build fix

Location:
code/branches/network4/src/libraries/network
Files:
4 edited

Legend:

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

    r7284 r7755  
    219219    assert(b);
    220220      clock.capture();
    221       COUT(0) << "diff time: " << clock.getDeltaTime() << endl;
     221      COUT(4) << "diff and compress time: " << clock.getDeltaTime() << endl;
    222222//     COUT(5) << "sending gamestate with id " << gs->getID();
    223223//     if(gamestate->isDiffed())
  • code/branches/network4/src/libraries/network/packet/Gamestate.cc

    r7754 r7755  
    6565
    6666Gamestate::Gamestate():
    67   header_(0)
     67  header_()
    6868{
    6969  flags_ = flags_ | PACKET_FLAG_GAMESTATE;
     
    176176  uint8_t *mem=data_+GamestateHeader::getSize();
    177177  Synchronisable *s;
    178 
     178 
    179179  // update the data of the objects we received
    180180  while(mem < data_+GamestateHeader::getSize()+header_.getDataSize())
     
    191191      else
    192192      {
     193//         COUT(4) << "not creating object of classid " << objectheader.getClassID() << endl;
    193194        mem += objectheader.getDataSize() + ( objectheader.isDiffed() ? SynchronisableHeaderLight::getSize() : SynchronisableHeader::getSize() );
    194195      }
     
    196197    else
    197198    {
     199//       COUT(4) << "updating object of classid " << objectheader.getClassID() << endl;
    198200      bool b = s->updateData(mem, mode);
    199201      assert(b);
     
    303305  header_.setCompSize( buffer );
    304306  header_.setCompressed( true );
    305   COUT(0) << "gamestate compress datasize: " << header_.getDataSize() << " compsize: " << header_.getCompSize() << std::endl;
     307  COUT(4) << "gamestate compress datasize: " << header_.getDataSize() << " compsize: " << header_.getCompSize() << std::endl;
    306308  return true;
    307309}
  • code/branches/network4/src/libraries/network/packet/Gamestate.h

    r7754 r7755  
    4848class _NetworkExport GamestateHeader{
    4949  public:
    50     GamestateHeader();
     50    GamestateHeader(){ data_=0; }
    5151    GamestateHeader(uint8_t* data)
    5252      { assert(data); data_ = data; *(uint32_t*)data_ = Type::Gamestate; }
  • code/branches/network4/src/libraries/network/synchronisable/Synchronisable.cc

    r7754 r7755  
    222222   * length of varx: size saved int syncvarlist
    223223   * @param mem pointer to allocated memory with enough size
    224    * @param sizes FIXME - add doc!
     224   * @param sizes vector containing sizes of all objects in gamestate (to be appended)
    225225   * @param id gamestateid of the gamestate to be saved (important for priorities)
    226226   * @param mode defines the direction in which the data will be send/received
    227227   *             0x1: server->client
    228    *             0x2: client->server (not recommended)
     228   *             0x2: client->server
    229229   *             0x3: bidirectional
    230230   * @return true: if !doSync or if everything was successfully saved
     
    270270      //tempsize += (*i)->getSize( mode );
    271271    }
     272    assert(tempsize!=0);  // if this happens an empty object (with no variables) would be transmitted
    272273//     COUT(4) << endl;
    273274
Note: See TracChangeset for help on using the changeset viewer.