Merge remote-tracking branch 'gz/master' into thereisnospoon

This commit is contained in:
ZZYZX 2017-01-30 05:39:01 +02:00
commit 3e44109ad1
19 changed files with 120 additions and 80 deletions

View file

@ -1874,7 +1874,14 @@ void ZCCCompiler::InitDefaults()
if (!c->Type()->IsDescendantOf(RUNTIME_CLASS(AActor)))
{
if (c->Defaults.Size()) Error(c->cls, "%s: Non-actor classes may not have defaults", c->Type()->TypeName.GetChars());
if (c->Type()->ParentClass) c->Type()->ParentClass->DeriveData(c->Type());
if (c->Type()->ParentClass)
{
auto ti = static_cast<PClassActor *>(c->Type());
FString mename = ti->TypeName.GetChars();
ti->InitializeDefaults();
ti->ParentClass->DeriveData(ti);
}
}
else
{