mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-31 12:30:32 +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,8 +3219,10 @@ PClass *PClass::CreateDerivedClass(FName name, unsigned int size)
|
||||||
|
|
||||||
const PClass *existclass = FindClass(name);
|
const PClass *existclass = FindClass(name);
|
||||||
|
|
||||||
|
if (existclass != nullptr)
|
||||||
|
{
|
||||||
// This is a placeholder so fill it in
|
// This is a placeholder so fill it in
|
||||||
if (existclass != NULL && existclass->Size == (unsigned)-1)
|
if (existclass->Size == TentativeClass)
|
||||||
{
|
{
|
||||||
type = const_cast<PClass*>(existclass);
|
type = const_cast<PClass*>(existclass);
|
||||||
if (!IsDescendantOf(type->ParentClass))
|
if (!IsDescendantOf(type->ParentClass))
|
||||||
|
@ -3231,6 +3233,12 @@ PClass *PClass::CreateDerivedClass(FName name, unsigned int size)
|
||||||
notnew = true;
|
notnew = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
// a different class with the same name already exists. Let the calling code deal with this.
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
type = static_cast<PClass *>(GetClass()->CreateNew());
|
type = static_cast<PClass *>(GetClass()->CreateNew());
|
||||||
notnew = false;
|
notnew = false;
|
||||||
|
|
Loading…
Reference in a new issue