mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 14:41:40 +00:00
- restored some code in PClass::CreateDerivedClass that accidentally got removed.
This commit is contained in:
parent
4bae6e81db
commit
65c4653f59
1 changed files with 15 additions and 7 deletions
|
@ -3219,16 +3219,24 @@ PClass *PClass::CreateDerivedClass(FName name, unsigned int size)
|
|||
|
||||
const PClass *existclass = FindClass(name);
|
||||
|
||||
// This is a placeholder so fill it in
|
||||
if (existclass != NULL && existclass->Size == (unsigned)-1)
|
||||
if (existclass != nullptr)
|
||||
{
|
||||
type = const_cast<PClass*>(existclass);
|
||||
if (!IsDescendantOf(type->ParentClass))
|
||||
// This is a placeholder so fill it in
|
||||
if (existclass->Size == TentativeClass)
|
||||
{
|
||||
I_Error("%s must inherit from %s but doesn't.", name.GetChars(), type->ParentClass->TypeName.GetChars());
|
||||
type = const_cast<PClass*>(existclass);
|
||||
if (!IsDescendantOf(type->ParentClass))
|
||||
{
|
||||
I_Error("%s must inherit from %s but doesn't.", name.GetChars(), type->ParentClass->TypeName.GetChars());
|
||||
}
|
||||
DPrintf(DMSG_SPAMMY, "Defining placeholder class %s\n", name.GetChars());
|
||||
notnew = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// a different class with the same name already exists. Let the calling code deal with this.
|
||||
return nullptr;
|
||||
}
|
||||
DPrintf(DMSG_SPAMMY, "Defining placeholder class %s\n", name.GetChars());
|
||||
notnew = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue