From 2dc857b31d9e70b2652ecda2acadb11c917988d6 Mon Sep 17 00:00:00 2001 From: "Huaiyu (Kitty) Liu" Date: Tue, 8 Feb 2011 15:55:00 -0800 Subject: [PATCH] Added code to serialization/deserialize LocalFlags. Need further testing to see if it's necessary. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 1 + .../Scenes/Serialization/SceneObjectSerializer.cs | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4edfdf93c7..489b94a80a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -5734,6 +5734,7 @@ namespace OpenSim.Region.Framework.Scenes "EveryoneMask", "NextOwnerMask", "Flags", + "LocalFlags", "CollisionSound", "CollisionSoundVolume", "MediaUrl", diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 415be99c69..4189c1fc88 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -330,6 +330,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem); //SYMMETRIC SYNC + m_SOPXmlProcessors.Add("LocalFlags", ProcessLocalFlags); //m_SOPXmlProcessors.Add("LastUpdateTimeStamp", ProcessUpdateTimeStamp); //m_SOPXmlProcessors.Add("LastUpdateActorID", ProcessLastUpdateActorID); m_SOPXmlProcessors.Add("BucketSyncInfoList", ProcessBucketSyncInfo); @@ -713,7 +714,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization { obj.LastUpdateActorID = reader.ReadElementContentAsString("LastUpdateActorID", string.Empty); } - * */ + * */ + + private static void ProcessLocalFlags(SceneObjectPart obj, XmlTextReader reader) + { + obj.LocalFlags = Util.ReadEnum(reader, "LocalFlags"); + } public static void ProcessBucketSyncInfo(SceneObjectPart obj, XmlTextReader reader) { @@ -1236,8 +1242,10 @@ namespace OpenSim.Region.Framework.Scenes.Serialization writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString()); writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); //SYMMETRIC SYNC: also serialize SceneObjectPart:LocalFlags, so that it can be propogated across actors - //WriteFlags(writer, "Flags", sop.Flags.ToString(), options); - WriteFlags(writer, "Flags", sop.GetEffectiveObjectFlags().ToString(), options); + WriteFlags(writer, "Flags", sop.Flags.ToString(), options); + WriteFlags(writer, "LocalFlags", sop.LocalFlags.ToString(), options); + //writer.WriteElementString("Flags", sop.Flags.ToString()); + //writer.WriteElementString("LocalFlags", sop.Flags.ToString()); //end SYMMETRIC SYNC WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());