Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
UMAPINFO: Fix nextsecret inconsistencies (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfomin authored Apr 25, 2022
1 parent 784a17d commit b21bdbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prboom2/src/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions prboom2/src/umapinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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])
{
Expand Down

0 comments on commit b21bdbc

Please sign in to comment.