Store importance (nmuslumps check) to prevent having to do it again when doing d_netfil stuff.
This commit is contained in:
parent
33d5373e84
commit
d685060aef
|
@ -116,7 +116,7 @@ UINT8 *PutFileNeeded(void)
|
||||||
for (i = 0; i < numwadfiles; i++)
|
for (i = 0; i < numwadfiles; i++)
|
||||||
{
|
{
|
||||||
// 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 (W_VerifyNMUSlumps(wadfiles[i]->filename))
|
if (!wadfiles[i]->important)
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
filestatus = 1; // Importance - not really used any more, holds 1 by default for backwards compat with MS
|
filestatus = 1; // Importance - not really used any more, holds 1 by default for backwards compat with MS
|
||||||
|
@ -339,7 +339,7 @@ INT32 CL_CheckFiles(void)
|
||||||
CONS_Debug(DBG_NETPLAY, "game is modified; only doing basic checks\n");
|
CONS_Debug(DBG_NETPLAY, "game is modified; only doing basic checks\n");
|
||||||
for (i = 1, j = 1; i < fileneedednum || j < numwadfiles;)
|
for (i = 1, j = 1; i < fileneedednum || j < numwadfiles;)
|
||||||
{
|
{
|
||||||
if (j < numwadfiles && W_VerifyNMUSlumps(wadfiles[j]->filename))
|
if (j < numwadfiles && !wadfiles[j]->important)
|
||||||
{
|
{
|
||||||
// Unimportant on our side.
|
// Unimportant on our side.
|
||||||
++j;
|
++j;
|
||||||
|
|
|
@ -298,6 +298,7 @@ UINT16 W_LoadWadFile(const char *filename)
|
||||||
INT32 compressed = 0;
|
INT32 compressed = 0;
|
||||||
size_t packetsize;
|
size_t packetsize;
|
||||||
UINT8 md5sum[16];
|
UINT8 md5sum[16];
|
||||||
|
boolean important;
|
||||||
|
|
||||||
if (!(refreshdirmenu & REFRESHDIR_ADDFILE))
|
if (!(refreshdirmenu & REFRESHDIR_ADDFILE))
|
||||||
refreshdirmenu = REFRESHDIR_NORMAL|REFRESHDIR_ADDFILE; // clean out cons_alerts that happened earlier
|
refreshdirmenu = REFRESHDIR_NORMAL|REFRESHDIR_ADDFILE; // clean out cons_alerts that happened earlier
|
||||||
|
@ -320,7 +321,7 @@ UINT16 W_LoadWadFile(const char *filename)
|
||||||
// Check if wad files will overflow fileneededbuffer. Only the filename part
|
// Check if wad files will overflow fileneededbuffer. Only the filename part
|
||||||
// is send in the packet; cf.
|
// is send in the packet; cf.
|
||||||
// see PutFileNeeded in d_netfil.c
|
// see PutFileNeeded in d_netfil.c
|
||||||
if (!W_VerifyNMUSlumps(filename))
|
if ((important = !W_VerifyNMUSlumps(filename)))
|
||||||
{
|
{
|
||||||
packetsize = packetsizetally;
|
packetsize = packetsizetally;
|
||||||
|
|
||||||
|
@ -474,6 +475,7 @@ UINT16 W_LoadWadFile(const char *filename)
|
||||||
wadfile->handle = handle;
|
wadfile->handle = handle;
|
||||||
wadfile->numlumps = (UINT16)numlumps;
|
wadfile->numlumps = (UINT16)numlumps;
|
||||||
wadfile->lumpinfo = lumpinfo;
|
wadfile->lumpinfo = lumpinfo;
|
||||||
|
wadfile->important = important;
|
||||||
fseek(handle, 0, SEEK_END);
|
fseek(handle, 0, SEEK_END);
|
||||||
wadfile->filesize = (unsigned)ftell(handle);
|
wadfile->filesize = (unsigned)ftell(handle);
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ typedef struct wadfile_s
|
||||||
FILE *handle;
|
FILE *handle;
|
||||||
UINT32 filesize; // for network
|
UINT32 filesize; // for network
|
||||||
UINT8 md5sum[16];
|
UINT8 md5sum[16];
|
||||||
|
boolean important; // also network - !W_VerifyNMUSlumps
|
||||||
} wadfile_t;
|
} wadfile_t;
|
||||||
|
|
||||||
#define WADFILENUM(lumpnum) (UINT16)((lumpnum)>>16) // wad flumpnum>>16) // wad file number in upper word
|
#define WADFILENUM(lumpnum) (UINT16)((lumpnum)>>16) // wad flumpnum>>16) // wad file number in upper word
|
||||||
|
|
Loading…
Reference in New Issue