diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 7d3a168..795da3f 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -1671,7 +1671,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1671 | writer.WriteElementString("ProfileBegin", shp.ProfileBegin.ToString()); | 1671 | writer.WriteElementString("ProfileBegin", shp.ProfileBegin.ToString()); |
1672 | writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString()); | 1672 | writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString()); |
1673 | writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); | 1673 | writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); |
1674 | writer.WriteElementString("State", shp.State.ToString()); | 1674 | // There's no such thing as a primitive with state != 0 (attachment) |
1675 | writer.WriteElementString("State", (shp.PCode == (byte)PCodeEnum.Primitive ? "0" : shp.State.ToString())); | ||
1675 | writer.WriteElementString("LastAttachPoint", shp.LastAttachPoint.ToString()); | 1676 | writer.WriteElementString("LastAttachPoint", shp.LastAttachPoint.ToString()); |
1676 | 1677 | ||
1677 | WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options); | 1678 | WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options); |
@@ -1799,6 +1800,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1799 | 1800 | ||
1800 | reader.ReadEndElement(); // Shape | 1801 | reader.ReadEndElement(); // Shape |
1801 | 1802 | ||
1803 | if (shape.PCode == (byte)PCodeEnum.Primitive && shape.State != 0) | ||
1804 | // This should not happen! | ||
1805 | shape.State = 0; | ||
1806 | |||
1802 | errorNodeNames = internalErrorNodeNames; | 1807 | errorNodeNames = internalErrorNodeNames; |
1803 | 1808 | ||
1804 | return shape; | 1809 | return shape; |