Changeset 405 for code/branches/FICN/src/network/PacketGenerator.cc
- Timestamp:
- Dec 5, 2007, 4:40:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/network/PacketGenerator.cc
r403 r405 72 72 ENetPacket* PacketGenerator::gstate( GameStateCompressed* states, int reliable ) 73 73 { 74 int* gid; *gid = GAMESTATE; //first assign the correct enet id 75 int totalLen = 3*sizeof( int ) + states->size; //calculate the total size of the datastream memory 74 int* gid = new int; 75 *gid = GAMESTATE; //first assign the correct enet id 76 int totalLen = 3*sizeof( int ) + states->compsize; //calculate the total size of the datastream memory 76 77 unsigned char* data = (unsigned char*)malloc( totalLen ); //allocate the memory for datastream 77 78 memcpy( (void*)(data), (const void*)gid, sizeof( int ) ); //this is the enet id
Note: See TracChangeset
for help on using the changeset viewer.