mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-29 15:32:24 +00:00
- fix initialization issues with a few serializer functions.
This commit is contained in:
parent
7faac89288
commit
8445dbf94a
1 changed files with 15 additions and 3 deletions
|
@ -296,7 +296,11 @@ void DDukeActor::Serialize(FSerializer& arc)
|
||||||
FSerializer& Serialize(FSerializer& arc, const char* keyname, Cycler& w, Cycler* def)
|
FSerializer& Serialize(FSerializer& arc, const char* keyname, Cycler& w, Cycler* def)
|
||||||
{
|
{
|
||||||
static Cycler nul;
|
static Cycler nul;
|
||||||
if (!def) def = &nul;
|
if (!def)
|
||||||
|
{
|
||||||
|
def = &nul;
|
||||||
|
if (arc.isReading()) w = {};
|
||||||
|
}
|
||||||
if (arc.BeginObject(keyname))
|
if (arc.BeginObject(keyname))
|
||||||
{
|
{
|
||||||
arc("sector", w.sector, def->sector)
|
arc("sector", w.sector, def->sector)
|
||||||
|
@ -313,7 +317,11 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, Cycler& w, Cycler*
|
||||||
FSerializer& Serialize(FSerializer& arc, const char* keyname, AmbientTags& w, AmbientTags* def)
|
FSerializer& Serialize(FSerializer& arc, const char* keyname, AmbientTags& w, AmbientTags* def)
|
||||||
{
|
{
|
||||||
static AmbientTags nul;
|
static AmbientTags nul;
|
||||||
if (!def) def = &nul;
|
if (!def)
|
||||||
|
{
|
||||||
|
def = &nul;
|
||||||
|
if (arc.isReading()) w = {};
|
||||||
|
}
|
||||||
if (arc.BeginObject(keyname))
|
if (arc.BeginObject(keyname))
|
||||||
{
|
{
|
||||||
arc("lotag", w.lo, def->lo)
|
arc("lotag", w.lo, def->lo)
|
||||||
|
@ -326,7 +334,11 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, AmbientTags& w, Am
|
||||||
FSerializer& Serialize(FSerializer& arc, const char* keyname, animate& w, animate* def)
|
FSerializer& Serialize(FSerializer& arc, const char* keyname, animate& w, animate* def)
|
||||||
{
|
{
|
||||||
static animate nul;
|
static animate nul;
|
||||||
if (!def) def = &nul;
|
if (!def)
|
||||||
|
{
|
||||||
|
def = &nul;
|
||||||
|
if (arc.isReading()) w = {};
|
||||||
|
}
|
||||||
if (arc.BeginObject(keyname))
|
if (arc.BeginObject(keyname))
|
||||||
{
|
{
|
||||||
arc("sector", w.sect, def->sect)
|
arc("sector", w.sect, def->sect)
|
||||||
|
|
Loading…
Reference in a new issue