diff options
author | Jonathan Freedman | 2010-11-05 19:10:02 -0700 |
---|---|---|
committer | Jonathan Freedman | 2010-11-05 19:10:02 -0700 |
commit | 4f40374464899dad82abdb9c36ea863ceac0d83f (patch) | |
tree | a9b116ccca55fb07b8c79ab7f6fdfafc8466d740 /OpenSim/Region/Framework/Scenes/Serialization | |
parent | Merge branch 'master' into mantis5110 (diff) | |
parent | Merge branch 'master' of /var/git/opensim/ (diff) | |
download | opensim-SC-4f40374464899dad82abdb9c36ea863ceac0d83f.zip opensim-SC-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.gz opensim-SC-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.bz2 opensim-SC-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.xz |
Merge git://github.com/opensim/opensim into mantis5110
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-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()); |