always define a "next" map for a UMAPINFO entry (#833)

* always define a "next" map for a UMAPINFO entry

* use MAPNAME()

* cosmetic change
This commit is contained in:
Fabian Greffrath 2022-12-07 21:46:23 +01:00 committed by GitHub
parent 7df1465e64
commit e4ecf2d163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,7 @@
#include <string.h>
#include <ctype.h>
#include "doomstat.h"
#include "info.h"
#include "i_system.h"
#include "m_misc2.h"
@ -667,6 +668,15 @@ static int ParseStandardProperty(u_scanner_t* s, mapentry_t *mape)
U_GetNextToken(s, true);
} while (U_CheckToken(s, ','));
if (!mape->nextmap[0] && !mape->endpic[0])
{
int ep, map;
G_ValidateMapName(mape->mapname, &ep, &map);
strcpy(mape->nextmap, MAPNAME(ep, map + 1));
}
free(pname);
return status;
}