aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
diff options
context:
space:
mode:
authorMelanie2012-02-26 12:29:35 +0100
committerMelanie2012-02-26 12:29:35 +0100
commitaa552d0526349f0db6911dbd867c847cf4e810f6 (patch)
tree8781dfe09ae135cc42ad6506bf5ce0e9e82b6cea /OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
parentZero force and torque on take so that items don't run away when rezzed (diff)
downloadopensim-SC-aa552d0526349f0db6911dbd867c847cf4e810f6.zip
opensim-SC-aa552d0526349f0db6911dbd867c847cf4e810f6.tar.gz
opensim-SC-aa552d0526349f0db6911dbd867c847cf4e810f6.tar.bz2
opensim-SC-aa552d0526349f0db6911dbd867c847cf4e810f6.tar.xz
Serialize Keyframe motion for region crossings
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs22
1 files changed, 21 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index ed761da..a9f3e84 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -244,6 +244,17 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
244 sr.Close(); 244 sr.Close();
245 } 245 }
246 246
247 XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion");
248 if (keymotion.Count > 0)
249 {
250 m_log.DebugFormat("[SERIALIZER]: Deserialized KeyframeMotion");
251 sceneObject.KeyframeMotion = KeyframeMotion.FromData(sceneObject, Convert.FromBase64String(keymotion[0].InnerText));
252 }
253 else
254 {
255 sceneObject.KeyframeMotion = null;
256 }
257
247 // Script state may, or may not, exist. Not having any, is NOT 258 // Script state may, or may not, exist. Not having any, is NOT
248 // ever a problem. 259 // ever a problem.
249 sceneObject.LoadScriptState(doc); 260 sceneObject.LoadScriptState(doc);
@@ -597,7 +608,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
597 obj.sopVehicle = _vehicle; 608 obj.sopVehicle = _vehicle;
598 } 609 }
599 610
600
601 private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) 611 private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader)
602 { 612 {
603 List<string> errorNodeNames; 613 List<string> errorNodeNames;
@@ -1168,6 +1178,16 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1168 }); 1178 });
1169 1179
1170 writer.WriteEndElement(); 1180 writer.WriteEndElement();
1181
1182 if (sog.KeyframeMotion != null)
1183 {
1184 Byte[] data = sog.KeyframeMotion.Serialize();
1185
1186 writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty);
1187 writer.WriteBase64(data, 0, data.Length);
1188 writer.WriteEndElement();
1189 }
1190
1171 writer.WriteEndElement(); 1191 writer.WriteEndElement();
1172 } 1192 }
1173 1193