mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-03 17:32:54 +00:00
Another fix, most serialization is working
- Changed some logic when giving an actor that doesn't have a modeldef a modeldef to make sure it knows it doesn't have one when cleared - Fixed the serialization for modelData. Only problem now is that I was right about needing to push the models on load
This commit is contained in:
parent
83a23c6525
commit
5b8789977a
2 changed files with 3 additions and 2 deletions
|
@ -5055,12 +5055,12 @@ DEFINE_ACTION_FUNCTION(AActor, A_ChangeModel)
|
|||
if (mobj->modelData == nullptr)
|
||||
{
|
||||
auto ptr = Create<DActorModelData>();
|
||||
ptr->hasModel = modeldef != NAME_None && !mobj->hasmodel ? 0 : 1;
|
||||
ptr->hasModel = mobj->hasmodel ? 1 : 0;
|
||||
ptr->modelIDs = *new TArray<int>();
|
||||
ptr->skinIDs = *new TArray<FTextureID>();
|
||||
ptr->modelDef = NAME_None;
|
||||
mobj->modelData = ptr;
|
||||
mobj->hasmodel = mobj->modelData->hasModel;
|
||||
mobj->hasmodel = 1;
|
||||
GC::WriteBarrier(mobj, ptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -173,6 +173,7 @@ IMPLEMENT_POINTERS_START(AActor)
|
|||
IMPLEMENT_POINTER(Poisoner)
|
||||
IMPLEMENT_POINTER(alternative)
|
||||
IMPLEMENT_POINTER(ViewPos)
|
||||
IMPLEMENT_POINTER(modelData)
|
||||
IMPLEMENT_POINTERS_END
|
||||
|
||||
AActor::~AActor ()
|
||||
|
|
Loading…
Reference in a new issue