mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Always omit unimportant files from fileneeded (fixes rejoining modded always failing in DEVELOP)
This commit is contained in:
parent
e4ab3a036e
commit
64c6998807
1 changed files with 12 additions and 1 deletions
|
|
@ -166,7 +166,7 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
|
||||||
for (; i < numwadfiles; i++) //mainwads+1, otherwise we start on the first mainwad
|
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 it has only music/sound lumps, don't put it in the list
|
||||||
if (i > mainwads && !wadfiles[i]->important)
|
if (!wadfiles[i]->important)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (firstfile)
|
if (firstfile)
|
||||||
|
|
@ -175,6 +175,8 @@ UINT8 *PutFileNeeded(UINT16 firstfile)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CONS_Printf("putting %d (%s) - mw %d\n", i, wadfiles[i]->filename, mainwads);
|
||||||
|
|
||||||
nameonly(strcpy(wadfilename, wadfiles[i]->filename));
|
nameonly(strcpy(wadfilename, wadfiles[i]->filename));
|
||||||
|
|
||||||
// Look below at the WRITE macros to understand what these numbers mean.
|
// Look below at the WRITE macros to understand what these numbers mean.
|
||||||
|
|
@ -564,6 +566,9 @@ INT32 CL_CheckFiles(void)
|
||||||
#endif
|
#endif
|
||||||
for (i = 0; i < fileneedednum || j < numwadfiles;)
|
for (i = 0; i < fileneedednum || j < numwadfiles;)
|
||||||
{
|
{
|
||||||
|
// CONS_Printf("checking %d of %d / %d of %d?\n", i, fileneedednum, j, numwadfiles);
|
||||||
|
// CONS_Printf("i: %s / j: %s \n", fileneeded[i].filename, wadfiles[j]->filename);
|
||||||
|
|
||||||
if (j < numwadfiles && !wadfiles[j]->important)
|
if (j < numwadfiles && !wadfiles[j]->important)
|
||||||
{
|
{
|
||||||
// Unimportant on our side.
|
// Unimportant on our side.
|
||||||
|
|
@ -574,11 +579,17 @@ INT32 CL_CheckFiles(void)
|
||||||
// If this test is true, we've reached the end of one file list
|
// If this test is true, we've reached the end of one file list
|
||||||
// and the other still has a file that's important
|
// and the other still has a file that's important
|
||||||
if (i >= fileneedednum || j >= numwadfiles)
|
if (i >= fileneedednum || j >= numwadfiles)
|
||||||
|
{
|
||||||
return 2;
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// For the sake of speed, only bother with a md5 check
|
// For the sake of speed, only bother with a md5 check
|
||||||
if (memcmp(wadfiles[j]->md5sum, fileneeded[i].md5sum, 16))
|
if (memcmp(wadfiles[j]->md5sum, fileneeded[i].md5sum, 16))
|
||||||
|
{
|
||||||
return 2;
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// It's accounted for! let's keep going.
|
// It's accounted for! let's keep going.
|
||||||
CONS_Debug(DBG_NETPLAY, "'%s' accounted for\n", fileneeded[i].filename);
|
CONS_Debug(DBG_NETPLAY, "'%s' accounted for\n", fileneeded[i].filename);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue