- fixed: Non-actor classes never called InitializeDefaults to set up their special variables.
- fixed: DThinkerIterator and DBlockThingsIterator did not have a default constructor that was safe to call from an out-of-game context.
This commit is contained in:
parent
c0ef052d07
commit
eef91463ab
6 changed files with 53 additions and 29 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue