Don't let us warp to a map that doesn't exist (really!)

Okay so 6464df9876, I WAS mistaken! Except that's
not how you check for a map's existence, at least not how the old map command
did it.
This commit is contained in:
James R 2019-12-29 02:44:27 -08:00
parent 404f3c13e4
commit 566b4a1626
1 changed files with 4 additions and 0 deletions

View File

@ -4580,6 +4580,10 @@ INT32 G_FindMapByNameOrCode(const char *mapname, char **realmapnamep)
if (usemapcode)
{
/* we can't check mapheaderinfo for this hahahaha */
if (W_CheckNumForName(G_BuildMapName(newmapnum)) == LUMPERROR)
return 0;
if (realmapnamep)
(*realmapnamep) = G_BuildMapTitle(newmapnum);
}