mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- fix initialization issues with a few serializer functions.
This commit is contained in:
parent
4cdb0c3c55
commit
efd6d2cf07
1 changed files with 15 additions and 3 deletions
|
@ -294,7 +294,11 @@ void DDukeActor::Serialize(FSerializer& arc)
|
|||
FSerializer& Serialize(FSerializer& arc, const char* keyname, Cycler& w, Cycler* def)
|
||||
{
|
||||
static Cycler nul;
|
||||
if (!def) def = &nul;
|
||||
if (!def)
|
||||
{
|
||||
def = &nul;
|
||||
if (arc.isReading()) w = {};
|
||||
}
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("sector", w.sector, def->sector)
|
||||
|
@ -311,7 +315,11 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, Cycler& w, Cycler*
|
|||
FSerializer& Serialize(FSerializer& arc, const char* keyname, AmbientTags& w, AmbientTags* def)
|
||||
{
|
||||
static AmbientTags nul;
|
||||
if (!def) def = &nul;
|
||||
if (!def)
|
||||
{
|
||||
def = &nul;
|
||||
if (arc.isReading()) w = {};
|
||||
}
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("lotag", w.lo, def->lo)
|
||||
|
@ -324,7 +332,11 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, AmbientTags& w, Am
|
|||
FSerializer& Serialize(FSerializer& arc, const char* keyname, animate& w, animate* def)
|
||||
{
|
||||
static animate nul;
|
||||
if (!def) def = &nul;
|
||||
if (!def)
|
||||
{
|
||||
def = &nul;
|
||||
if (arc.isReading()) w = {};
|
||||
}
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("sector", w.sect, def->sect)
|
||||
|
|
Loading…
Reference in a new issue