Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 9, 2007, 1:46:03 PM (16 years ago)
Author:
dumenim
Message:

changed PacketGenerator/Decoder with diffed

File:
1 edited

Legend:

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

    r415 r437  
    4444                return true;
    4545                break;
    46           case CLASSID:
    47                 clid(packet);
    48                 return true;
    49                 break;
     46    case CLASSID:
     47        clid(packet);
     48        return true;
     49        break;
    5050        }
    5151        return false;
     
    120120        //size of uncompressed data
    121121        memcpy( (void*)&(currentState->normsize), (const void*)(data+3*sizeof( int )), sizeof( int ) );
     122        //since the packetgenerator was changed, due to a new parameter, change this function too
     123        memcpy( (void*)&(currentState->diffed), (const void*)(data+4*sizeof(int)), sizeof(bool));
    122124        //since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream
    123125        currentState->data = (unsigned char*)(malloc( currentState->compsize ));
    124126        //copy the GameStateCompressed data
    125         memcpy( (void*)(currentState->data), (const void*)(data+4*sizeof( int )), currentState->compsize );
     127        memcpy( (void*)(currentState->data), (const void*)(data+4*sizeof( int ) + sizeof(bool)), currentState->compsize );
    126128 
    127129        //clean memory
Note: See TracChangeset for help on using the changeset viewer.