Merge branch 'full-file-list' into 'master'

Disable downloading and check md5 of mainwads (maps.pk3, patch.pk3, etc.) in netgames

See merge request KartKrew/Kart!490
This commit is contained in:
James R 2021-12-13 06:31:31 +00:00
commit 1285812b84

View file

@ -161,10 +161,16 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
char wadfilename[MAX_WADPATH] = "";
UINT8 filestatus;
for (i = mainwads+1; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad
#ifdef DEVELOP
i = 0;
#else
i = mainwads + 1;
#endif
for (; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad
{
// If it has only music/sound lumps, don't put it in the list
if (!wadfiles[i]->important)
if (i > mainwads && !wadfiles[i]->important)
continue;
if (firstfile)
@ -276,11 +282,16 @@ boolean CL_CheckDownloadable(void)
}
// Downloading locally disabled
#if 0
if (!dlstatus && M_CheckParm("-nodownload"))
dlstatus = 3;
if (!dlstatus)
return true;
#else
if (!dlstatus)
dlstatus = 3;
#endif
// not downloadable, put reason in console
CONS_Alert(CONS_NOTICE, M_GetText("You need additional files to connect to this server:\n"));
@ -489,7 +500,12 @@ INT32 CL_CheckFiles(void)
CONS_Debug(DBG_NETPLAY, "searching for '%s' ", fileneeded[i].filename);
// Check in already loaded files
for (j = mainwads+1; wadfiles[j]; j++)
#ifdef DEVELOP
j = 0;
#else
j = mainwads + 1;
#endif
for (; wadfiles[j]; j++)
{
nameonly(strcpy(wadfilename, wadfiles[j]->filename));
if (!stricmp(wadfilename, fileneeded[i].filename) &&