mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
- fixed map name setup
This was broken when localization for Hexen was added.
This commit is contained in:
parent
ef050d700c
commit
8efc3188b9
1 changed files with 12 additions and 9 deletions
|
@ -1925,20 +1925,23 @@ level_info_t *FMapInfoParser::ParseMapHeader(level_info_t &defaultinfo)
|
|||
levelinfo->flags |= LEVEL_LOOKUPLEVELNAME;
|
||||
levelinfo->LevelName = sc.String;
|
||||
}
|
||||
else if (HexenHack)
|
||||
else
|
||||
{
|
||||
levelinfo->LevelName = sc.String;
|
||||
|
||||
// Try to localize Hexen's map names.
|
||||
int fileno = Wads.GetLumpFile(sc.LumpNum);
|
||||
auto fn = Wads.GetWadName(fileno);
|
||||
if (fn && (!stricmp(fn, "HEXEN.WAD") || !stricmp(fn, "HEXDD.WAD")))
|
||||
if (HexenHack)
|
||||
{
|
||||
FStringf key("TXT_%.5s_%s", fn, levelinfo->MapName.GetChars());
|
||||
if (GStrings.exists(key))
|
||||
// Try to localize Hexen's map names.
|
||||
int fileno = Wads.GetLumpFile(sc.LumpNum);
|
||||
auto fn = Wads.GetWadName(fileno);
|
||||
if (fn && (!stricmp(fn, "HEXEN.WAD") || !stricmp(fn, "HEXDD.WAD")))
|
||||
{
|
||||
levelinfo->flags |= LEVEL_LOOKUPLEVELNAME;
|
||||
levelinfo->LevelName = key;
|
||||
FStringf key("TXT_%.5s_%s", fn, levelinfo->MapName.GetChars());
|
||||
if (GStrings.exists(key))
|
||||
{
|
||||
levelinfo->flags |= LEVEL_LOOKUPLEVELNAME;
|
||||
levelinfo->LevelName = key;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue