- made author names work with title patches.

Most importantly, specifying a patch may optionally disallow showing the autor's name - this is for cases where a styled patch gets used for English but text-based translations of the map name should still be possible.
This commit is contained in:
Christoph Oelckers 2019-08-07 12:09:47 +02:00
commit 43041c21d8
4 changed files with 38 additions and 13 deletions

View file

@ -834,13 +834,13 @@ bool FLevelLocals::DoCompleted (FString nextlevel, wbstartstruct_t &wminfo)
// [RH] Mark this level as having been visited
if (!(flags & LEVEL_CHANGEMAPCHEAT))
FindLevelInfo (MapName)->flags |= LEVEL_VISITED;
info->flags |= LEVEL_VISITED;
uint32_t langtable[2] = {};
wminfo.finished_ep = cluster - 1;
wminfo.LName0 = TexMan.CheckForTexture(info->PName, ETextureType::MiscPatch);
wminfo.thisname = info->LookupLevelName(&langtable[0]); // re-get the name so we have more info about its origin.
wminfo.thisauthor = info->AuthorName;
if (!wminfo.LName0.isValid() || !(info->flags3 & LEVEL3_HIDEAUTHORNAME)) wminfo.thisauthor = info->AuthorName;
wminfo.current = MapName;
if (deathmatch &&
@ -867,7 +867,7 @@ bool FLevelLocals::DoCompleted (FString nextlevel, wbstartstruct_t &wminfo)
wminfo.next = nextinfo->MapName;
wminfo.LName1 = TexMan.CheckForTexture(nextinfo->PName, ETextureType::MiscPatch);
wminfo.nextname = nextinfo->LookupLevelName(&langtable[1]);
wminfo.nextauthor = nextinfo->AuthorName;
if (!wminfo.LName1.isValid() || !(nextinfo->flags3 & LEVEL3_HIDEAUTHORNAME)) wminfo.nextauthor = nextinfo->AuthorName;
}
}