Oh? a cookie on the ground

*takes the cookie*
This commit is contained in:
Louis-Antoine 2017-01-13 23:10:00 +01:00
parent 490778cdab
commit b8b720088e
2 changed files with 4 additions and 2 deletions

View file

@ -274,7 +274,6 @@ static boolean GetFreeAcknum(UINT8 *freeack, boolean lowtimer)
I_Error("Connection lost\n"); I_Error("Connection lost\n");
return false; return false;
} }
#endif
/** Counts how many acks are free /** Counts how many acks are free
* *
@ -308,7 +307,6 @@ INT32 Net_GetFreeAcks(boolean urgent)
return n; return n;
} }
#ifndef NONET
// Get a ack to send in the queue of this node // Get a ack to send in the queue of this node
static UINT8 GetAcktosend(INT32 node) static UINT8 GetAcktosend(INT32 node)
{ {

View file

@ -662,7 +662,11 @@ void SV_FileSendTicker(void)
{ {
packetsent = cv_downloadspeed.value; packetsent = cv_downloadspeed.value;
// Don't send more packets than we have free acks // Don't send more packets than we have free acks
#ifndef NONET
maxpacketsent = Net_GetFreeAcks(false) - 5; // Let 5 extra acks just in case maxpacketsent = Net_GetFreeAcks(false) - 5; // Let 5 extra acks just in case
#else
maxpacketsent = 1;
#endif
if (packetsent > maxpacketsent && maxpacketsent > 0) // Send at least one packet if (packetsent > maxpacketsent && maxpacketsent > 0) // Send at least one packet
packetsent = maxpacketsent; packetsent = maxpacketsent;
} }