Changeset 1248 for code/branches/network3/src/network/PacketDecoder.cc
- Timestamp:
- May 8, 2008, 11:53:58 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network3/src/network/PacketDecoder.cc
r1245 r1248 90 90 return false; 91 91 } 92 93 // ATTENTION: TODO watch, that arguments we pass over to the processFunction gets deleted in THE PROCESSXXX function 92 94 93 95 //following are the decode functions for the data of the packets … … 101 103 COUT(4) << "PacketDecoder: got ack id: " << a->a << std::endl; 102 104 processAck( a, clientId ); //debug info 103 104 105 //clean memory 105 106 enet_packet_destroy( packet ); … … 121 122 //clean memory 122 123 enet_packet_destroy( packet ); 123 124 124 printMouse( mouseMove ); //debug info 125 125 } … … 132 132 //clean memory 133 133 enet_packet_destroy( packet ); 134 135 134 printKey( key ); //debug info 136 135 … … 232 231 { 233 232 printChat(data, clientId); 233 delete[] data->message; 234 delete data; 234 235 } 235 236 236 237 void PacketDecoder::processGamestate( GameStateCompressed *state, int clientID ) 237 238 { 238 COUT( 5) << "PacketDecoder: processing Gamestate" << std::endl;239 COUT(3) << "PacketDecoder-process: processing Gamestate" << std::endl; 239 240 //printGamestate( state ); 241 delete[] state->data; 242 delete state; 240 243 } 241 244 … … 243 246 { 244 247 printClassid(cid); 248 delete cid; 245 249 return; 246 250 } … … 249 253 { 250 254 printAck(data); 255 delete data; 251 256 return; 252 257 } 253 258 254 259 bool PacketDecoder::processWelcome( welcome *w ){ 260 delete w; 255 261 return true; 256 262 } … … 258 264 bool PacketDecoder::processConnectRequest( connectRequest *con, int clientID ){ 259 265 COUT(3) << "packetdecoder: processing connectRequest" << std::endl; 266 delete con; 260 267 return true; 261 268 }
Note: See TracChangeset
for help on using the changeset viewer.