From e4ecf2d16322485e666a3e13291b71dcf7ff3c8e Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Wed, 7 Dec 2022 21:46:23 +0100 Subject: [PATCH] always define a "next" map for a UMAPINFO entry (#833) * always define a "next" map for a UMAPINFO entry * use MAPNAME() * cosmetic change --- src/u_mapinfo.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/u_mapinfo.c b/src/u_mapinfo.c index b1eb378b..65cf8909 100644 --- a/src/u_mapinfo.c +++ b/src/u_mapinfo.c @@ -22,6 +22,7 @@ #include #include +#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; }