- fixed secplane_t serializer. It passed incorrect defaults to the sub-serializers and calculated negiC wrong.

This commit is contained in:
Christoph Oelckers 2016-09-23 23:47:25 +02:00
parent 69291b9cf9
commit b7c822d208

View file

@ -201,13 +201,13 @@ FSerializer &Serialize(FSerializer &arc, const char *key, secplane_t &p, secplan
if (arc.BeginObject(key))
{
arc("normal", p.normal, def->normal)
("d", p.D, def->D)
.EndObject();
Serialize(arc, "normal", p.normal, def ? &def->normal : nullptr);
Serialize(arc, "d", p.D, def ? &def->D : nullptr);
arc.EndObject();
if (arc.isReading() && p.normal.Z != 0)
{
p.negiC = 1 / p.normal.Z;
p.negiC = -1 / p.normal.Z;
}
}
return arc;