Add optional filtering to listmaps CCMD output

This commit is contained in:
Nikolay Ambartsumov 2020-10-03 11:00:22 +02:00 committed by drfrag
parent 493cc9af0d
commit 3a8ccda80f

View file

@ -2224,8 +2224,14 @@ CCMD(listmaps)
if (map != NULL) if (map != NULL)
{ {
Printf("%s: '%s' (%s)\n", info->MapName.GetChars(), info->LookupLevelName().GetChars(), if (argv.argc() == 1
Wads.GetWadName(Wads.GetLumpFile(map->lumpnum))); || CheckWildcards(argv[1], info->MapName.GetChars())
|| CheckWildcards(argv[1], info->LookupLevelName().GetChars())
|| CheckWildcards(argv[1], Wads.GetWadName(Wads.GetLumpFile(map->lumpnum))))
{
Printf("%s: '%s' (%s)\n", info->MapName.GetChars(), info->LookupLevelName().GetChars(),
Wads.GetWadName(Wads.GetLumpFile(map->lumpnum)));
}
delete map; delete map;
} }
} }