aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2014-07-27 08:08:01 +0100
committerUbitUmarov2014-07-27 08:08:01 +0100
commiteb55e69d4ade5bb825c65bbda7cd71564fa4f51d (patch)
tree71a38818e396710bd99b473467ff5e37aad86e66
parentclear script controls on crossing (untested)(possible should be done (diff)
downloadopensim-SC_OLD-eb55e69d4ade5bb825c65bbda7cd71564fa4f51d.zip
opensim-SC_OLD-eb55e69d4ade5bb825c65bbda7cd71564fa4f51d.tar.gz
opensim-SC_OLD-eb55e69d4ade5bb825c65bbda7cd71564fa4f51d.tar.bz2
opensim-SC_OLD-eb55e69d4ade5bb825c65bbda7cd71564fa4f51d.tar.xz
serialize sound parameters for llLoopSound
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs49
1 files changed, 48 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 5372360..3b3a99b 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -268,10 +268,17 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
268 else 268 else
269 sceneObject.RootPart.KeyframeMotion = null; 269 sceneObject.RootPart.KeyframeMotion = null;
270 270
271
272 XmlNodeList SOGSound = doc.GetElementsByTagName("SOGSound");
273 if (SOGSound.Count > 0)
274 {
275
276 }
277
271 // Script state may, or may not, exist. Not having any, is NOT 278 // Script state may, or may not, exist. Not having any, is NOT
272 // ever a problem. 279 // ever a problem.
273 sceneObject.LoadScriptState(doc); 280 sceneObject.LoadScriptState(doc);
274 281
275 return sceneObject; 282 return sceneObject;
276 } 283 }
277 catch (Exception e) 284 catch (Exception e)
@@ -391,6 +398,12 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
391 m_SOPXmlProcessors.Add("CameraEyeOffset", ProcessCameraEyeOffset); 398 m_SOPXmlProcessors.Add("CameraEyeOffset", ProcessCameraEyeOffset);
392 m_SOPXmlProcessors.Add("CameraAtOffset", ProcessCameraAtOffset); 399 m_SOPXmlProcessors.Add("CameraAtOffset", ProcessCameraAtOffset);
393 400
401 m_SOPXmlProcessors.Add("SoundID", ProcessSoundID);
402 m_SOPXmlProcessors.Add("SoundGain", ProcessSoundGain);
403 m_SOPXmlProcessors.Add("SoundFlags", ProcessSoundFlags);
404 m_SOPXmlProcessors.Add("SoundRadius", ProcessSoundRadius);
405 m_SOPXmlProcessors.Add("SoundQueueing", ProcessSoundQueueing);
406
394 #endregion 407 #endregion
395 408
396 #region TaskInventoryXmlProcessors initialization 409 #region TaskInventoryXmlProcessors initialization
@@ -654,6 +667,30 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
654 obj.SetCameraAtOffset(Util.ReadVector(reader, "CameraAtOffset")); 667 obj.SetCameraAtOffset(Util.ReadVector(reader, "CameraAtOffset"));
655 } 668 }
656 669
670 private static void ProcessSoundID(SceneObjectPart obj, XmlTextReader reader)
671 {
672 obj.Sound = Util.ReadUUID(reader, "SoundID");
673 }
674
675 private static void ProcessSoundGain(SceneObjectPart obj, XmlTextReader reader)
676 {
677 obj.SoundGain = reader.ReadElementContentAsDouble("SoundGain", String.Empty);
678 }
679
680 private static void ProcessSoundFlags(SceneObjectPart obj, XmlTextReader reader)
681 {
682 obj.SoundFlags = (byte)reader.ReadElementContentAsInt("SoundFlags", String.Empty);
683 }
684
685 private static void ProcessSoundRadius(SceneObjectPart obj, XmlTextReader reader)
686 {
687 obj.SoundRadius = reader.ReadElementContentAsDouble("SoundRadius", String.Empty);
688 }
689
690 private static void ProcessSoundQueueing(SceneObjectPart obj, XmlTextReader reader)
691 {
692 obj.SoundQueueing = Util.ReadBoolean(reader);
693 }
657 private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader) 694 private static void ProcessVehicle(SceneObjectPart obj, XmlTextReader reader)
658 { 695 {
659 SOPVehicle vehicle = SOPVehicle.FromXml2(reader); 696 SOPVehicle vehicle = SOPVehicle.FromXml2(reader);
@@ -1265,6 +1302,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1265 writer.WriteBase64(data, 0, data.Length); 1302 writer.WriteBase64(data, 0, data.Length);
1266 writer.WriteEndElement(); 1303 writer.WriteEndElement();
1267 } 1304 }
1305
1268 1306
1269 writer.WriteEndElement(); 1307 writer.WriteEndElement();
1270 } 1308 }
@@ -1397,6 +1435,15 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1397 WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset()); 1435 WriteVector(writer, "CameraEyeOffset", sop.GetCameraEyeOffset());
1398 WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset()); 1436 WriteVector(writer, "CameraAtOffset", sop.GetCameraAtOffset());
1399 1437
1438 // if (sop.Sound != UUID.Zero) force it till sop crossing does clear it on child prim
1439 {
1440 WriteUUID(writer, "SoundID", sop.Sound, options);
1441 writer.WriteElementString("SoundGain", sop.SoundGain.ToString().ToLower());
1442 writer.WriteElementString("SoundFlags", sop.SoundFlags.ToString().ToLower());
1443 writer.WriteElementString("SoundRadius", sop.SoundRadius.ToString().ToLower());
1444 }
1445 writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower());
1446
1400 writer.WriteEndElement(); 1447 writer.WriteEndElement();
1401 } 1448 }
1402 1449