fix G_GotoNextLevel for last UMAPINFO map

This commit is contained in:
Roman Fomin 2021-05-22 17:21:52 +07:00
parent 9638975f4c
commit b471773cbd

View File

@ -2502,10 +2502,15 @@ static int G_GotoNextLevel(void)
if (gamemapinfo != NULL)
{
const char *n;
const char *n = NULL;
if (gamemapinfo->nextsecret[0]) n = gamemapinfo->nextsecret;
else n = gamemapinfo->nextmap;
G_ValidateMapName(n, &epsd, &map);
else if (gamemapinfo->nextmap[0]) n = gamemapinfo->nextmap;
else if (gamemapinfo->endpic[0] && gamemapinfo->endpic[0] != '-')
{
epsd = 1;
map = 1;
}
if (n) G_ValidateMapName(n, &epsd, &map);
}
if (map == -1)