- allow optional terrain definitions

... because any Doom terrain WAD would otherwise spam the logfile with messages when running an error log batch.
This commit is contained in:
Christoph Oelckers 2016-02-09 14:38:42 +01:00
parent 4d2a52418f
commit 78ac944242

View file

@ -627,13 +627,19 @@ static void ParseFloor (FScanner &sc)
FTextureID picnum;
int terrain;
bool opt = sc.CheckString("optional");
sc.MustGetString ();
picnum = TexMan.CheckForTexture (sc.String, FTexture::TEX_Flat,
FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_TryAny);
if (!picnum.Exists())
{
Printf ("Unknown flat %s\n", sc.String);
sc.MustGetString ();
sc.MustGetString();
if (!opt)
{
Printf("Unknown flat %s\n", sc.String);
}
return;
}
sc.MustGetString ();