diff options
author | lsalzman <[email protected]> | 2013-02-27 16:29:22 +0200 |
---|---|---|
committer | lsalzman <[email protected]> | 2013-02-27 16:29:22 +0200 |
commit | 4ce4aac14954ee9c302708468ec6c0efd3a1ac2f (patch) | |
tree | 9b1d3003db23130c3461e501e885a28261fb8a1c /protocol.c | |
parent | 8ff344897a5937b45820b42127b70e1938f97ed0 (diff) | |
download | enet-4ce4aac14954ee9c302708468ec6c0efd3a1ac2f.tar.gz enet-4ce4aac14954ee9c302708468ec6c0efd3a1ac2f.zip |
added ENET_PACKET_FLAG_SENT to indicate that a packet has been sent
Diffstat (limited to 'protocol.c')
-rw-r--r-- | protocol.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -163,7 +163,11 @@ enet_protocol_remove_sent_unreliable_commands (ENetPeer * peer) -- outgoingCommand -> packet -> referenceCount; if (outgoingCommand -> packet -> referenceCount == 0) - enet_packet_destroy (outgoingCommand -> packet); + { + outgoingCommand -> packet -> flags |= ENET_PACKET_FLAG_SENT; + + enet_packet_destroy (outgoingCommand -> packet); + } } enet_free (outgoingCommand); @@ -237,7 +241,11 @@ enet_protocol_remove_sent_reliable_command (ENetPeer * peer, enet_uint16 reliabl -- outgoingCommand -> packet -> referenceCount; if (outgoingCommand -> packet -> referenceCount == 0) - enet_packet_destroy (outgoingCommand -> packet); + { + outgoingCommand -> packet -> flags |= ENET_PACKET_FLAG_SENT; + + enet_packet_destroy (outgoingCommand -> packet); + } } enet_free (outgoingCommand); |