Mantis #7932: Some objects were being serialized with PCode=9 and State != 0 (meaning attachments). That should never happen.
parent
34b308d5b6
commit
f19199cf4a
|
@ -1671,7 +1671,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
writer.WriteElementString("ProfileBegin", shp.ProfileBegin.ToString());
|
writer.WriteElementString("ProfileBegin", shp.ProfileBegin.ToString());
|
||||||
writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString());
|
writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString());
|
||||||
writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString());
|
writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString());
|
||||||
writer.WriteElementString("State", shp.State.ToString());
|
// There's no such thing as a primitive with state != 0 (attachment)
|
||||||
|
writer.WriteElementString("State", (shp.PCode == (byte)PCodeEnum.Primitive ? "0" : shp.State.ToString()));
|
||||||
writer.WriteElementString("LastAttachPoint", shp.LastAttachPoint.ToString());
|
writer.WriteElementString("LastAttachPoint", shp.LastAttachPoint.ToString());
|
||||||
|
|
||||||
WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options);
|
WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options);
|
||||||
|
@ -1799,6 +1800,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
|
|
||||||
reader.ReadEndElement(); // Shape
|
reader.ReadEndElement(); // Shape
|
||||||
|
|
||||||
|
if (shape.PCode == (byte)PCodeEnum.Primitive && shape.State != 0)
|
||||||
|
// This should not happen!
|
||||||
|
shape.State = 0;
|
||||||
|
|
||||||
errorNodeNames = internalErrorNodeNames;
|
errorNodeNames = internalErrorNodeNames;
|
||||||
|
|
||||||
return shape;
|
return shape;
|
||||||
|
|
Loading…
Reference in New Issue