mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- added the resource file name to the listmaps printout.
This commit is contained in:
parent
c17808d789
commit
25d79285a3
2 changed files with 11 additions and 2 deletions
|
@ -1446,7 +1446,7 @@ const char *FileSystem::GetResourceFileName (int rfnum) const noexcept
|
|||
|
||||
name = Files[rfnum]->FileName;
|
||||
slash = strrchr (name, '/');
|
||||
return slash != NULL ? slash+1 : name;
|
||||
return (slash != NULL && slash[1] != 0) ? slash+1 : name;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -55,7 +55,16 @@ CCMD(listmaps)
|
|||
{
|
||||
for (unsigned int i = 0; i < numUsedSlots; i++)
|
||||
{
|
||||
Printf("%s - %s\n", mapList[i].fileName.GetChars(), mapList[i].DisplayName());
|
||||
int lump = fileSystem.FindFile(mapList[i].fileName);
|
||||
if (lump >= 0)
|
||||
{
|
||||
int rfnum = fileSystem.GetFileContainer(lump);
|
||||
Printf("%s - %s (%s)\n", mapList[i].fileName.GetChars(), mapList[i].DisplayName(), fileSystem.GetResourceFileName(rfnum));
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf("%s - %s (defined but does not exist)\n", mapList[i].fileName.GetChars(), mapList[i].DisplayName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue