- removed PClass::DeriveData because it is no longer needed.

- fixed: IsVisibleToPlayer and optimized it a bit more.
- moved SourceLumpName to PClass, so that it can also be used for non-actors (there's a lot of non-Actor classes already.)
- separated the serializer for PClassPointer from PPointer. Even though not doable, a pointer to a class type is something entirely different than a class pointer with a restriction so each should handle its own case.
This commit is contained in:
Christoph Oelckers 2017-04-12 09:55:27 +02:00
commit 5350721ec5
8 changed files with 40 additions and 62 deletions

View file

@ -625,8 +625,7 @@ void ZCCCompiler::CreateClassTypes()
DPrintf(DMSG_SPAMMY, "Registered %s as native with parent %s\n", me->TypeName.GetChars(), parent->TypeName.GetChars());
}
c->cls->Type = me;
auto ac = dyn_cast<PClassActor>(me);
if (ac != nullptr) ac->ActorInfo()->SourceLumpName = *c->cls->SourceName;
me->SourceLumpName = *c->cls->SourceName;
}
else
{
@ -2194,7 +2193,6 @@ void ZCCCompiler::InitDefaults()
FString mename = ti->TypeName.GetChars();
ti->InitializeDefaults();
ti->ParentClass->DeriveData(ti);
}
}
else
@ -2215,7 +2213,6 @@ void ZCCCompiler::InitDefaults()
auto ti = static_cast<PClassActor *>(c->Type());
ti->InitializeDefaults();
ti->ParentClass->DeriveData(ti);
// We need special treatment for this one field in AActor's defaults which cannot be made visible to DECORATE as a property.
// It's better to do this here under controlled conditions than deeper down in the class type classes.