- 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

View file

@ -608,6 +608,7 @@ void FDecalLib::ParseGenerator (FScanner &sc)
// Get name of generator (actor) // Get name of generator (actor)
sc.MustGetString (); sc.MustGetString ();
optional = sc.Compare("optional"); optional = sc.Compare("optional");
if (optional) sc.MustGetString();
type = PClass::FindClass (sc.String); type = PClass::FindClass (sc.String);
if (type == NULL || type->ActorInfo == NULL) if (type == NULL || type->ActorInfo == NULL)
@ -626,7 +627,7 @@ void FDecalLib::ParseGenerator (FScanner &sc)
decal = ScanTreeForName (sc.String, Root); decal = ScanTreeForName (sc.String, Root);
if (decal == NULL) 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) if (type != NULL)