fix dsdhacked actors not spawning when placed in a map
This commit is contained in:
parent
2d030d5313
commit
fc470b4f7c
1 changed files with 6 additions and 1 deletions
|
|
@ -139,6 +139,7 @@ static PClassActor* FindInfoName(int index, bool mustexist = false)
|
|||
cls = static_cast<PClassActor*>(RUNTIME_CLASS(AActor)->CreateDerivedClass(name.GetChars(), (unsigned)sizeof(AActor)));
|
||||
NewClassType(cls, -1); // This needs a VM type to work as intended.
|
||||
cls->InitializeDefaults();
|
||||
PClassActor::AllActorClasses.Push(cls);
|
||||
}
|
||||
if (cls)
|
||||
{
|
||||
|
|
@ -3714,7 +3715,11 @@ void FinishDehPatch ()
|
|||
mysnprintf(typeNameBuilder, countof(typeNameBuilder), "DehackedPickup%d", nameindex++);
|
||||
bool newlycreated;
|
||||
subclass = static_cast<PClassActor *>(dehtype->CreateDerivedClass(typeNameBuilder, dehtype->Size, &newlycreated, 0));
|
||||
if (newlycreated) subclass->InitializeDefaults();
|
||||
if (newlycreated)
|
||||
{
|
||||
subclass->InitializeDefaults();
|
||||
PClassActor::AllActorClasses.Push(subclass);
|
||||
}
|
||||
}
|
||||
while (subclass == nullptr);
|
||||
NewClassType(subclass, 0); // This needs a VM type to work as intended.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue