From b21bdbc198f382bb5a938b287eab696a5328567a Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Mon, 25 Apr 2022 14:46:19 +0700 Subject: [PATCH] UMAPINFO: Fix nextsecret inconsistencies (#497) --- prboom2/src/g_game.c | 2 +- prboom2/src/umapinfo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prboom2/src/g_game.c b/prboom2/src/g_game.c index 57d624a50..de6a15c07 100644 --- a/prboom2/src/g_game.c +++ b/prboom2/src/g_game.c @@ -1844,7 +1844,7 @@ void G_WorldDone (void) return; } - else if (gamemapinfo->endpic[0] && (strcmp(gamemapinfo->endpic, "-") != 0)) + else if (gamemapinfo->endpic[0] && gamemapinfo->endpic[0] != '-' && !secretexit) { // game ends without a status screen. gameaction = ga_victory; diff --git a/prboom2/src/umapinfo.cpp b/prboom2/src/umapinfo.cpp index 9aba55b4e..258912e3f 100644 --- a/prboom2/src/umapinfo.cpp +++ b/prboom2/src/umapinfo.cpp @@ -453,7 +453,7 @@ static int ParseStandardProperty(Scanner &scanner, MapEntry *mape) ParseLumpName(scanner, mape->nextsecret); if (!G_ValidateMapName(mape->nextsecret, NULL, NULL)) { - scanner.ErrorF("Invalid map name %s", mape->nextmap); + scanner.ErrorF("Invalid map name %s", mape->nextsecret); return 0; } } @@ -678,7 +678,7 @@ int ParseUMapInfo(const unsigned char *buffer, size_t length, umapinfo_errorfunc // Set default level progression here to simplify the checks elsewhere. Doing this lets us skip all normal code for this if nothing has been defined. if (parsed.endpic[0] && (strcmp(parsed.endpic, "-") != 0)) { - parsed.nextmap[0] = parsed.nextsecret[0] = 0; + parsed.nextmap[0] = 0; } else if (!parsed.nextmap[0] && !parsed.endpic[0]) {