TArrays to TObjPtr
- Made the 2 TArrays into a class called DActorModelData. - Removed the skinindex and now just uses one index - Replaced a bunch of nullptr for modelDef checking with NAME_None - Added some garbage cleanup to A_ChangeModel itself, as well as removing memory of modelData that is no longer needed - Attempted serialize code, putting up for review
This commit is contained in:
parent
c304a8f974
commit
e827e9b086
6 changed files with 83 additions and 26 deletions
|
|
@ -158,6 +158,7 @@ CVAR (Int, cl_bloodtype, 0, CVAR_ARCHIVE);
|
|||
|
||||
// CODE --------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_CLASS(DActorModelData, false, false);
|
||||
IMPLEMENT_CLASS(AActor, false, true)
|
||||
|
||||
IMPLEMENT_POINTERS_START(AActor)
|
||||
|
|
@ -374,7 +375,9 @@ void AActor::Serialize(FSerializer &arc)
|
|||
("viewpos", ViewPos)
|
||||
A("lightlevel", LightLevel)
|
||||
A("userlights", UserLights)
|
||||
A("WorldOffset", WorldOffset);
|
||||
A("WorldOffset", WorldOffset)
|
||||
A("modelData", modelData)
|
||||
A("modelDef", modelDef);
|
||||
|
||||
SerializeTerrain(arc, "floorterrain", floorterrain, &def->floorterrain);
|
||||
SerializeArgs(arc, "args", args, def->args, special);
|
||||
|
|
@ -1353,6 +1356,20 @@ bool AActor::Massacre ()
|
|||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// Serialize DActorModelData
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void DActorModelData::Serialize(FSerializer& arc)
|
||||
{
|
||||
Super::Serialize(arc);
|
||||
arc ("modelIDs", modelIDs)
|
||||
("skinIDs", skinIDs)
|
||||
("hasModel", hasModel);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_ExplodeMissile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue