- silence all error messages in the state map parser for DEHSUPP when re-reading the data.

The state map will just be skipped and the parser only needs to run to get over the data.
However, due to changes from a previous patch the data cannot be validated so aside from not using the data it may also not abort on errors.
This commit is contained in:
Christoph Oelckers 2018-02-27 11:34:44 +01:00
parent f3deaf54c6
commit d873ae75ab

View file

@ -2840,14 +2840,14 @@ static bool LoadDehSupp ()
sc.MustGetString();
PClassActor *actortype = static_cast<PClassActor *>(type);
s.State = actortype->FindState(sc.String);
if (s.State == NULL)
if (s.State == NULL && addit)
{
sc.ScriptError("Invalid state '%s' in '%s'", sc.String, type->TypeName.GetChars());
}
sc.MustGetStringName(",");
sc.MustGetNumber();
if (s.State == NULL || sc.Number < 1 || !actortype->OwnsState(s.State + sc.Number - 1))
if (addit && (s.State == NULL || sc.Number < 1 || !actortype->OwnsState(s.State + sc.Number - 1)))
{
sc.ScriptError("Invalid state range in '%s'", type->TypeName.GetChars());
}