mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
fixed UMAPINFO's label field to allow 'clear' as argument.
This commit is contained in:
parent
34dc204517
commit
40546420b0
2 changed files with 18 additions and 3 deletions
|
@ -148,8 +148,22 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape, int *id24_l
|
|||
}
|
||||
else if (!pname.CompareNoCase("label"))
|
||||
{
|
||||
scanner.MustGetToken(TK_StringConst);
|
||||
mape->label = scanner.String;
|
||||
if (scanner.CheckToken(TK_Identifier))
|
||||
{
|
||||
if (!stricmp(scanner.String, "clear"))
|
||||
{
|
||||
mape->label = "*";
|
||||
}
|
||||
else
|
||||
{
|
||||
scanner.ScriptError("Either 'clear' or string constant expected");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scanner.MustGetToken(TK_StringConst);
|
||||
mape->label = scanner.String;
|
||||
}
|
||||
}
|
||||
else if (!pname.CompareNoCase("next"))
|
||||
{
|
||||
|
|
|
@ -2266,7 +2266,8 @@ void FormatMapName(FLevelLocals *self, int cr, FString *result)
|
|||
// If a label is specified, use it uncontitionally here.
|
||||
if (self->info->MapLabel.IsNotEmpty())
|
||||
{
|
||||
*result << self->info->MapLabel << ": ";
|
||||
if (self->info->MapLabel.Compare("*"))
|
||||
*result << self->info->MapLabel << ": ";
|
||||
}
|
||||
else if (am_showmaplabel == 1 || (am_showmaplabel == 2 && !ishub))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue