reliable packet throttle

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5965 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2010-12-20 11:50:40 +00:00
parent 0120ba6078
commit 6888b56087
2 changed files with 3 additions and 1 deletions
+3 -1
View File
@@ -1291,7 +1291,9 @@ enet_protocol_send_reliable_outgoing_commands (ENetHost * host, ENetPeer * peer)
if (outgoingCommand -> packet != NULL)
{
if (peer -> reliableDataInTransit + outgoingCommand -> fragmentLength > peer -> windowSize)
enet_uint32 windowSize = (peer -> packetThrottle * peer -> windowSize) / ENET_PEER_PACKET_THROTTLE_SCALE;
if (peer -> reliableDataInTransit + outgoingCommand -> fragmentLength > ENET_MAX (windowSize, peer -> mtu))
break;
if ((enet_uint16) (peer -> mtu - host -> packetSize) < (enet_uint16) (commandSize + outgoingCommand -> fragmentLength))