mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-23 04:42:47 +00:00
Fix replacing MAPXX maps through adding a WAD not working
This commit is contained in:
parent
7558589a2a
commit
aaae5ae941
1 changed files with 10 additions and 13 deletions
|
@ -8199,7 +8199,6 @@ void P_LoadMapsFromFile(UINT16 wadnum, boolean added_ingame)
|
|||
lumpinfo_t *lumpinfo = NULL;
|
||||
UINT16 numlumps = 0;
|
||||
|
||||
INT16 num;
|
||||
const char *name;
|
||||
|
||||
if (W_FileHasFolders(wadfiles[wadnum]))
|
||||
|
@ -8245,20 +8244,18 @@ void P_LoadMapsFromFile(UINT16 wadnum, boolean added_ingame)
|
|||
for (size_t i = 0; i < numlumps; i++, lumpinfo++)
|
||||
{
|
||||
name = lumpinfo->name;
|
||||
if (name[0] == 'M' && name[1] == 'A' && name[2] == 'P')
|
||||
if (name[0] == 'M' && name[1] == 'A' && name[2] == 'P' && name[5] == '\0')
|
||||
{
|
||||
int status = P_AddMap(name, (wadnum << 16) + i);
|
||||
if (status == 1)
|
||||
{
|
||||
if (name[5]!='\0')
|
||||
continue;
|
||||
num = (INT16)M_MapNumber(name[3], name[4]);
|
||||
|
||||
//If you replaced the map you're on, end the level when done.
|
||||
if (gamestate == GS_LEVEL && num == gamemap)
|
||||
replacedcurrentmap = true;
|
||||
|
||||
if (added_ingame)
|
||||
CONS_Printf("%s\n", name);
|
||||
mapsadded = true;
|
||||
}
|
||||
else if (status < 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Now do markers
|
||||
|
|
Loading…
Reference in a new issue