mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
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
3 changed files with 6 additions and 3 deletions
|
@ -116,7 +116,7 @@ UINT8 *PutFileNeeded(void)
|
|||
for (i = 0; i < numwadfiles; i++)
|
||||
{
|
||||
// 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;
|
||||
else
|
||||
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");
|
||||
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.
|
||||
++j;
|
||||
|
|
|
@ -298,6 +298,7 @@ UINT16 W_LoadWadFile(const char *filename)
|
|||
INT32 compressed = 0;
|
||||
size_t packetsize;
|
||||
UINT8 md5sum[16];
|
||||
boolean important;
|
||||
|
||||
if (!(refreshdirmenu & REFRESHDIR_ADDFILE))
|
||||
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
|
||||
// is send in the packet; cf.
|
||||
// see PutFileNeeded in d_netfil.c
|
||||
if (!W_VerifyNMUSlumps(filename))
|
||||
if ((important = !W_VerifyNMUSlumps(filename)))
|
||||
{
|
||||
packetsize = packetsizetally;
|
||||
|
||||
|
@ -474,6 +475,7 @@ UINT16 W_LoadWadFile(const char *filename)
|
|||
wadfile->handle = handle;
|
||||
wadfile->numlumps = (UINT16)numlumps;
|
||||
wadfile->lumpinfo = lumpinfo;
|
||||
wadfile->important = important;
|
||||
fseek(handle, 0, SEEK_END);
|
||||
wadfile->filesize = (unsigned)ftell(handle);
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ typedef struct wadfile_s
|
|||
FILE *handle;
|
||||
UINT32 filesize; // for network
|
||||
UINT8 md5sum[16];
|
||||
boolean important; // also network - !W_VerifyNMUSlumps
|
||||
} wadfile_t;
|
||||
|
||||
#define WADFILENUM(lumpnum) (UINT16)((lumpnum)>>16) // wad flumpnum>>16) // wad file number in upper word
|
||||
|
|
Loading…
Reference in a new issue