Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 18, 2007, 7:05:51 PM (17 years ago)
Author:
scheusso
Message:

changes in gamestatehandling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/PacketDecoder.cc

    r620 r624  
    8989
    9090
     91  std::cout << "got ack id: " << a->id << std::endl;
    9192  processAck( a, clientId ); //debug info
    9293 
     
    146147  //memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) );
    147148  currentState->id = (int)*(data+sizeof(int));
     149  std::cout << "id: " << currentState->id << std::endl;
    148150        //copy the size of the GameStateCompressed compressed data into the new GameStateCompressed struct, located at 3th
    149151        //position of the data stream, data+2*sizeof( int )
    150152//      memcpy( (void*)&(currentState->compsize), (const void*)(data+2*sizeof( int )), sizeof( int) );
    151153  currentState->compsize = (int)*(data+2*sizeof(int));
     154  std::cout << "compsize: " << currentState->compsize << std::endl;
    152155        //size of uncompressed data
    153156//      memcpy( (void*)&(currentState->normsize), (const void*)(data+3*sizeof( int )), sizeof( int ) );
    154157  currentState->normsize = (int)*(data+3*sizeof(int));
     158  std::cout << "normsize. " << currentState->normsize << std::endl;
    155159        //since the packetgenerator was changed, due to a new parameter, change this function too
    156160//      memcpy( (void*)&(currentState->diffed), (const void*)(data+4*sizeof(int)), sizeof(bool));
    157161  currentState->diffed = (bool)*(data+4*sizeof(int));
     162  std::cout << "diffed: " << currentState->diffed << std::endl;
    158163        //since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream
    159164        currentState->data = (unsigned char*)(malloc( currentState->compsize ));
Note: See TracChangeset for help on using the changeset viewer.