- added missing sc.MustGetString() to 'optional' case of decal parser.

This commit is contained in:
Christoph Oelckers 2015-11-30 09:21:45 +01:00
parent c9e4f120e7
commit f4a60f29f3
1 changed files with 2 additions and 1 deletions

View File

@ -608,6 +608,7 @@ void FDecalLib::ParseGenerator (FScanner &sc)
// Get name of generator (actor)
sc.MustGetString ();
optional = sc.Compare("optional");
if (optional) sc.MustGetString();
type = PClass::FindClass (sc.String);
if (type == NULL || type->ActorInfo == NULL)
@ -626,7 +627,7 @@ void FDecalLib::ParseGenerator (FScanner &sc)
decal = ScanTreeForName (sc.String, Root);
if (decal == NULL)
{
sc.ScriptError ("%s has not been defined.", sc.String);
if (!optional) sc.ScriptError ("%s has not been defined.", sc.String);
}
}
if (type != NULL)