- Implemented ZScript abstract functions
This commit is contained in:
parent
628d23a688
commit
761dea8640
9 changed files with 82 additions and 22 deletions
|
|
@ -78,6 +78,19 @@ PClassActor *DecoDerivedClass(const FScriptPosition &sc, PClassActor *parent, FN
|
|||
{
|
||||
sc.Message(MSG_ERROR, "Parent class %s of %s not accessible to DECORATE", parent->TypeName.GetChars(), typeName.GetChars());
|
||||
}
|
||||
else
|
||||
{
|
||||
// [Player701] Parent class must not have abstract functions
|
||||
for (auto v : parent->Virtuals)
|
||||
{
|
||||
if (v->VarFlags & VARF_Abstract)
|
||||
{
|
||||
sc.Message(MSG_ERROR, "Parent class %s of %s cannot have abstract functions.", parent->TypeName.GetChars(), typeName.GetChars());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool newlycreated;
|
||||
PClassActor *type = static_cast<PClassActor *>(parent->CreateDerivedClass(typeName, parent->Size, &newlycreated));
|
||||
if (type == nullptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue