Remove downloadspeed cruft

This commit is contained in:
LJ Sonic 2021-12-02 23:34:28 +01:00
parent 14403737ef
commit ff037a8160
2 changed files with 2 additions and 10 deletions

View file

@ -3189,7 +3189,7 @@ consvar_t cv_maxsend = CVAR_INIT ("maxsend", "4096", CV_SAVE|CV_NETVAR, maxsend_
consvar_t cv_noticedownload = CVAR_INIT ("noticedownload", "Off", CV_SAVE|CV_NETVAR, CV_OnOff, NULL);
// Speed of file downloading (in packets per tic)
static CV_PossibleValue_t downloadspeed_cons_t[] = {{0, "MIN"}, {300, "MAX"}, {0, NULL}};
static CV_PossibleValue_t downloadspeed_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
consvar_t cv_downloadspeed = CVAR_INIT ("downloadspeed", "16", CV_SAVE|CV_NETVAR, downloadspeed_cons_t, NULL);
static void Got_AddPlayer(UINT8 **p, INT32 playernum);

View file

@ -925,7 +925,6 @@ static void SV_EndFileSend(INT32 node)
filestosend--;
}
#define PACKETPERTIC net_bandwidth/(TICRATE*software_MAXPACKETLENGTH)
#define FILEFRAGMENTSIZE (software_MAXPACKETLENGTH - (FILETXHEADER + BASEPACKETSIZE))
/** Handles file transmission
@ -958,14 +957,7 @@ void FileSendTicker(void)
if (!filestosend) // No file to send
return;
if (cv_downloadspeed.value) // New behavior
packetsent = cv_downloadspeed.value;
else // Old behavior
{
packetsent = PACKETPERTIC;
if (!packetsent)
packetsent = 1;
}
packetsent = cv_downloadspeed.value;
netbuffer->packettype = PT_FILEFRAGMENT;