- fixed skip_super application fro ZScript.

The order of processing is different here so when the property gets parsed there are no states to delete.
To fix this the property just flags the class and lets the ZScript state compiler deal with this as needed.
This commit is contained in:
Christoph Oelckers 2018-02-28 18:09:32 +01:00
commit 425f1408f7
3 changed files with 16 additions and 3 deletions

View file

@ -540,7 +540,7 @@ DEFINE_PROPERTY(skip_super, 0, Actor)
if (info->Size != actorclass->Size)
{
bag.ScriptPosition.Message(MSG_OPTERROR,
"'skip_super' is only allowed in subclasses of AActor with no additional fields and will be ignored in type %s.", info->TypeName.GetChars());
"'skip_super' is only allowed in subclasses of Actor with no additional fields and will be ignored in type %s.", info->TypeName.GetChars());
return;
}
if (bag.StateSet)
@ -552,6 +552,7 @@ DEFINE_PROPERTY(skip_super, 0, Actor)
*defaults = *GetDefault<AActor>();
ResetBaggage (&bag, RUNTIME_CLASS(AActor));
static_cast<PClassActor*>(bag.Info)->ActorInfo()->SkipSuperSet = true; // ZScript processes the states later so this property must be flagged for later handling.
}
//==========================================================================