Changeset 315
- Timestamp:
- Nov 28, 2007, 2:56:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/PacketDecoder.cc
r313 r315 54 54 ack* a = new ack; 55 55 *a = *(ack*)packet->data; //press pattern of ack on new data 56 57 //clean memory 58 enet_packet_destroy( packet ); 59 56 60 printAck( a ); //debug info 57 61 } … … 62 66 //copy data of packet->data to new struct 63 67 *mouseMove = *(mouse*)packet->data; 68 69 //clean memory 70 enet_packet_destroy( packet ); 71 64 72 printMouse( mouseMove ); //debug info 65 73 } … … 69 77 keyboard* key = new keyboard; 70 78 *key = *(keyboard*)packet->data; //see above 79 80 //clean memory 81 enet_packet_destroy( packet ); 82 71 83 printKey( key ); //debug info 84 72 85 } 73 86 … … 83 96 //put pointer of chatting struct to the begining of the new generated char* 84 97 chatting->message = reserve; 98 99 //clean memory 100 enet_packet_destroy( packet ); 101 85 102 printChat( chatting ); //debug info 103 86 104 } 87 105 … … 100 118 //copy the gamestate data 101 119 memcpy( (void*)(currentState->data), (const void*)(data+3*sizeof( int )), currentState->size ); 120 121 //clean memory 122 enet_packet_destroy( packet ); 102 123 } 103 124
Note: See TracChangeset
for help on using the changeset viewer.