From 91a5e077f2957c27dd3e1f2de1f1af2936742b36 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 8 May 2011 16:44:43 +0000 Subject: [PATCH] - Add the wad a map is defined in to the output of listmaps. SVN r3196 (trunk) --- src/g_level.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/g_level.cpp b/src/g_level.cpp index a962d5196..8934ab3c2 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1861,10 +1861,12 @@ CCMD(listmaps) for(unsigned i = 0; i < wadlevelinfos.Size(); i++) { level_info_t *info = &wadlevelinfos[i]; + MapData *map = P_OpenMapData(info->mapname); - if (P_CheckMapData(info->mapname)) + if (map != NULL) { - Printf("%s: '%s'\n", info->mapname, info->LookupLevelName().GetChars()); + Printf("%s: '%s' (%s)\n", info->mapname, info->LookupLevelName().GetChars(), + Wads.GetWadName(Wads.GetLumpFile(map->lumpnum))); } } }