diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 40c1e7eb8..a819c623b 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -4217,8 +4217,8 @@ consvar_t cv_resynchcooldown = {"gamestatecooldown", "5", CV_SAVE, resynchcooldo consvar_t cv_blamecfail = {"blamecfail", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL }; // max file size to send to a player (in kilobytes) -static CV_PossibleValue_t maxsend_cons_t[] = {{0, "MIN"}, {51200, "MAX"}, {0, NULL}}; -consvar_t cv_maxsend = {"maxsend", "MAX", CV_SAVE, maxsend_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; +static CV_PossibleValue_t maxsend_cons_t[] = {{-1, "MIN"}, {999999999, "MAX"}, {0, NULL}}; +consvar_t cv_maxsend = {"maxsend", "204800", CV_SAVE, maxsend_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_noticedownload = {"noticedownload", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; // Speed of file downloading (in packets per tic) diff --git a/src/d_netfil.c b/src/d_netfil.c index 98458b1ae..828b84d14 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -179,7 +179,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile) // Store in the upper four bits if (!cv_downloading.value) filestatus += (2 << 4); // Won't send - else if ((wadfiles[i]->filesize <= (UINT32)cv_maxsend.value * 1024)) + else if (cv_maxsend.value == -1 || wadfiles[i]->filesize <= (UINT32)cv_maxsend.value * 1024) filestatus += (1 << 4); // Will send if requested // else // filestatus += (0 << 4); -- Won't send, too big @@ -213,6 +213,7 @@ void D_ParseFileneeded(INT32 fileneedednum_parm, UINT8 *fileneededstr, UINT16 fi fileneedednum = firstfile + fileneedednum_parm; p = (UINT8 *)fileneededstr; + for (i = firstfile; i < fileneedednum; i++) { fileneeded[i].status = FS_NOTCHECKED; // We haven't even started looking for the file yet @@ -703,7 +704,7 @@ static boolean SV_SendFile(INT32 node, const char *filename, UINT8 fileid) } // Handle huge file requests (i.e. bigger than cv_maxsend.value KB) - if (wadfiles[i]->filesize > (UINT32)cv_maxsend.value * 1024) + if (cv_maxsend.value != -1 && wadfiles[i]->filesize > (UINT32)cv_maxsend.value * 1024) { // Too big // Don't inform client (client sucks, man)