diff --git a/src/cvars.cpp b/src/cvars.cpp index aa44ff17f..82645415a 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -622,7 +622,7 @@ void Lagless_OnChange(void); consvar_t cv_lagless = NetVar("lagless", "Off").on_off().onchange(Lagless_OnChange); // max file size to send to a player (in kilobytes) -consvar_t cv_maxsend = NetVar("maxsend", "51200").min_max(0, 51200); +consvar_t cv_maxsend = NetVar("maxsend", "204800").min_max(-1, 999999999); consvar_t cv_noticedownload = NetVar("noticedownload", "Off").on_off(); consvar_t cv_pingtimeout = NetVar("maxdelaytimeout", "10").min_max(8, 120); diff --git a/src/d_netfil.c b/src/d_netfil.c index a95767d5b..f1e7e31dc 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -204,7 +204,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 @@ -964,7 +964,7 @@ static boolean AddFileToSendQueue(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) diff --git a/src/k_menufunc.c b/src/k_menufunc.c index 1e832f748..38a27bf2d 100644 --- a/src/k_menufunc.c +++ b/src/k_menufunc.c @@ -176,7 +176,7 @@ void M_ChangeCvarDirect(INT32 choice, consvar_t *cv) if (cv == &cv_nettimeout || cv == &cv_jointimeout) choice *= (TICRATE/7); else if (cv == &cv_maxsend) - choice *= 512; + choice *= 1024; CV_AddValue(cv, choice); }