mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Only load map lumps that are WADs or have no extension
# Conflicts: # src/w_wad.c
This commit is contained in:
parent
2a92a80e7a
commit
5783c5aace
2 changed files with 6 additions and 2 deletions
|
|
@ -4313,7 +4313,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
|
||||||
|
|
||||||
// internal game map
|
// internal game map
|
||||||
maplumpname = G_BuildMapName(gamemap);
|
maplumpname = G_BuildMapName(gamemap);
|
||||||
lastloadedmaplumpnum = W_CheckNumForName(maplumpname);
|
lastloadedmaplumpnum = W_CheckNumForMap(maplumpname);
|
||||||
if (lastloadedmaplumpnum == LUMPERROR)
|
if (lastloadedmaplumpnum == LUMPERROR)
|
||||||
I_Error("Map %s not found.\n", maplumpname);
|
I_Error("Map %s not found.\n", maplumpname);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1229,10 +1229,14 @@ lumpnum_t W_CheckNumForMap(const char *name)
|
||||||
{
|
{
|
||||||
p = wadfiles[i]->lumpinfo + lumpNum;
|
p = wadfiles[i]->lumpinfo + lumpNum;
|
||||||
if (p->hash == hash && !strnicmp(name, p->name, 8))
|
if (p->hash == hash && !strnicmp(name, p->name, 8))
|
||||||
|
{
|
||||||
|
const char *extension = strrchr(p->fullname, '.');
|
||||||
|
if (!(extension && stricmp(extension, ".wad")))
|
||||||
return (i<<16) + lumpNum;
|
return (i<<16) + lumpNum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return LUMPERROR;
|
return LUMPERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue