diff options
author | Melanie | 2010-11-02 19:55:27 +0000 |
---|---|---|
committer | Melanie | 2010-11-02 19:55:27 +0000 |
commit | e327e990f5ab61fdd4065bf55c081b973a247774 (patch) | |
tree | b9afbb010b4efe39b888da7eecaaa5d8cbcdd45c /OpenSim/Region/Framework | |
parent | Try to not make avatars switch outfits (diff) | |
parent | Old deserialization can't deal with commas in flag fields. Making use of -ver... (diff) | |
download | opensim-SC-e327e990f5ab61fdd4065bf55c081b973a247774.zip opensim-SC-e327e990f5ab61fdd4065bf55c081b973a247774.tar.gz opensim-SC-e327e990f5ab61fdd4065bf55c081b973a247774.tar.bz2 opensim-SC-e327e990f5ab61fdd4065bf55c081b973a247774.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index e661ca9..7f37878 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -1135,7 +1135,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1135 | writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); | 1135 | writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); |
1136 | writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString()); | 1136 | writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString()); |
1137 | writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); | 1137 | writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); |
1138 | writer.WriteElementString("Flags", sop.Flags.ToString()); | 1138 | WriteFlags(writer, "Flags", sop.Flags.ToString(), options); |
1139 | WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); | 1139 | WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); |
1140 | writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); | 1140 | writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); |
1141 | if (sop.MediaUrl != null) | 1141 | if (sop.MediaUrl != null) |
@@ -1188,6 +1188,20 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1188 | 1188 | ||
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | static void WriteFlags(XmlTextWriter writer, string name, string flagsStr, Dictionary<string, object> options) | ||
1192 | { | ||
1193 | // Older versions of serialization can't cope with commas | ||
1194 | if (options.ContainsKey("version")) | ||
1195 | { | ||
1196 | float version = 0.5F; | ||
1197 | float.TryParse(options["version"].ToString(), out version); | ||
1198 | if (version < 0.5) | ||
1199 | flagsStr = flagsStr.Replace(",", ""); | ||
1200 | } | ||
1201 | |||
1202 | writer.WriteElementString(name, flagsStr); | ||
1203 | } | ||
1204 | |||
1191 | static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options) | 1205 | static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options) |
1192 | { | 1206 | { |
1193 | if (tinv.Count > 0) // otherwise skip this | 1207 | if (tinv.Count > 0) // otherwise skip this |
@@ -1275,8 +1289,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1275 | writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); | 1289 | writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); |
1276 | writer.WriteElementString("State", shp.State.ToString()); | 1290 | writer.WriteElementString("State", shp.State.ToString()); |
1277 | 1291 | ||
1278 | writer.WriteElementString("ProfileShape", shp.ProfileShape.ToString()); | 1292 | WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options); |
1279 | writer.WriteElementString("HollowShape", shp.HollowShape.ToString()); | 1293 | WriteFlags(writer, "HollowShape", shp.HollowShape.ToString(), options); |
1280 | 1294 | ||
1281 | WriteUUID(writer, "SculptTexture", shp.SculptTexture, options); | 1295 | WriteUUID(writer, "SculptTexture", shp.SculptTexture, options); |
1282 | writer.WriteElementString("SculptType", shp.SculptType.ToString()); | 1296 | writer.WriteElementString("SculptType", shp.SculptType.ToString()); |