mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make P_InitMapData/dependents use partadd_earliestfile
This commit is contained in:
parent
c4fd7d74dd
commit
bac58847fe
2 changed files with 15 additions and 13 deletions
|
|
@ -7766,20 +7766,9 @@ UINT8 P_InitMapData(boolean existingmapheaders)
|
|||
name = mapheaderinfo[i]->lumpname;
|
||||
maplump = W_CheckNumForMap(name);
|
||||
|
||||
// Doesn't exist?
|
||||
if (maplump == INT16_MAX)
|
||||
{
|
||||
#ifndef DEVELOP
|
||||
if (!existingmapheaders)
|
||||
{
|
||||
I_Error("P_InitMapData: Base map %s has a header but no level\n", name);
|
||||
}
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
// Always check for cup cache reassociations.
|
||||
// (The core assumption is that cups < headers.)
|
||||
if (maplump != LUMPERROR || mapheaderinfo[i]->lumpnum != LUMPERROR)
|
||||
{
|
||||
cupheader_t *cup = kartcupheaders;
|
||||
INT32 j;
|
||||
|
|
@ -7814,6 +7803,18 @@ UINT8 P_InitMapData(boolean existingmapheaders)
|
|||
}
|
||||
}
|
||||
|
||||
// Doesn't exist in this set of files?
|
||||
if (maplump == LUMPERROR)
|
||||
{
|
||||
#ifndef DEVELOP
|
||||
if (!existingmapheaders)
|
||||
{
|
||||
I_Error("P_InitMapData: Base map %s has a header but no level\n", name);
|
||||
}
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
// No change?
|
||||
if (mapheaderinfo[i]->lumpnum == maplump)
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1324,6 +1324,7 @@ lumpnum_t W_CheckNumForMap(const char *name)
|
|||
lumpnum_t check = INT16_MAX;
|
||||
UINT32 uhash, hash = quickncasehash(name, LUMPNUMCACHENAME);
|
||||
INT32 i;
|
||||
UINT16 firstfile = (partadd_earliestfile == UINT16_MAX) ? 0 : partadd_earliestfile;
|
||||
|
||||
// Check the lumpnumcache first. Loop backwards so that we check
|
||||
// most recent entries first
|
||||
|
|
@ -1339,7 +1340,7 @@ lumpnum_t W_CheckNumForMap(const char *name)
|
|||
|
||||
uhash = quickncasehash(name, 8); // Not a mistake, legacy system for short lumpnames
|
||||
|
||||
for (i = numwadfiles - 1; i >= 0; i--)
|
||||
for (i = numwadfiles - 1; i >= firstfile; i--)
|
||||
{
|
||||
check = W_CheckNumForMapPwad(name, uhash, (UINT16)i, 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue