diff options
author | UbitUmarov | 2018-12-31 09:54:54 +0000 |
---|---|---|
committer | UbitUmarov | 2018-12-31 09:54:54 +0000 |
commit | d841c593b983cbbacae953cfa81c466471f08813 (patch) | |
tree | 4b9bdd2a68e981ca7c8e241d6686e03d656b3a60 /OpenSim | |
parent | Put the virtual decls back in, they're needed by the freshly donated ... (diff) | |
download | opensim-SC-d841c593b983cbbacae953cfa81c466471f08813.zip opensim-SC-d841c593b983cbbacae953cfa81c466471f08813.tar.gz opensim-SC-d841c593b983cbbacae953cfa81c466471f08813.tar.bz2 opensim-SC-d841c593b983cbbacae953cfa81c466471f08813.tar.xz |
add a bit more persistence (still mysql only)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 31 |
2 files changed, 30 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 479fb91..651884f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -5750,7 +5750,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
5750 | if (AnimationsNames == null) | 5750 | if (AnimationsNames == null) |
5751 | return null; | 5751 | return null; |
5752 | 5752 | ||
5753 | |||
5754 | lock (animsLock) | 5753 | lock (animsLock) |
5755 | { | 5754 | { |
5756 | if (AnimationsNames.Count == 0) | 5755 | if (AnimationsNames.Count == 0) |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 590a5d4..a664d0c 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -235,7 +235,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
235 | if (doScriptStates) | 235 | if (doScriptStates) |
236 | sceneObject.SaveScriptedState(writer); | 236 | sceneObject.SaveScriptedState(writer); |
237 | 237 | ||
238 | |||
239 | if (!noRootElement) | 238 | if (!noRootElement) |
240 | writer.WriteEndElement(); // SceneObjectGroup | 239 | writer.WriteEndElement(); // SceneObjectGroup |
241 | 240 | ||
@@ -499,6 +498,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
499 | m_SOPXmlProcessors.Add("SoundRadius", ProcessSoundRadius); | 498 | m_SOPXmlProcessors.Add("SoundRadius", ProcessSoundRadius); |
500 | m_SOPXmlProcessors.Add("SoundQueueing", ProcessSoundQueueing); | 499 | m_SOPXmlProcessors.Add("SoundQueueing", ProcessSoundQueueing); |
501 | 500 | ||
501 | m_SOPXmlProcessors.Add("SOPAnims", ProcessSOPAnims); | ||
502 | |||
502 | #endregion | 503 | #endregion |
503 | 504 | ||
504 | #region TaskInventoryXmlProcessors initialization | 505 | #region TaskInventoryXmlProcessors initialization |
@@ -826,6 +827,27 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
826 | } | 827 | } |
827 | } | 828 | } |
828 | 829 | ||
830 | private static void ProcessSOPAnims(SceneObjectPart obj, XmlReader reader) | ||
831 | { | ||
832 | obj.Animations = null; | ||
833 | try | ||
834 | { | ||
835 | string datastr; | ||
836 | datastr = reader.ReadElementContentAsString(); | ||
837 | if(string.IsNullOrEmpty(datastr)) | ||
838 | return; | ||
839 | |||
840 | byte[] pdata = Convert.FromBase64String(datastr); | ||
841 | obj.DeSerializeAnimations(pdata); | ||
842 | return; | ||
843 | } | ||
844 | catch {} | ||
845 | |||
846 | m_log.DebugFormat( | ||
847 | "[SceneObjectSerializer]: Parsing ProcessSOPAnims for object part {0} {1} encountered errors", | ||
848 | obj.Name, obj.UUID); | ||
849 | } | ||
850 | |||
829 | private static void ProcessShape(SceneObjectPart obj, XmlReader reader) | 851 | private static void ProcessShape(SceneObjectPart obj, XmlReader reader) |
830 | { | 852 | { |
831 | List<string> errorNodeNames; | 853 | List<string> errorNodeNames; |
@@ -1588,6 +1610,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1588 | } | 1610 | } |
1589 | writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); | 1611 | writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower()); |
1590 | 1612 | ||
1613 | if (sop.Animations != null) | ||
1614 | { | ||
1615 | Byte[] data = sop.SerializeAnimations(); | ||
1616 | if(data != null && data.Length > 0) | ||
1617 | writer.WriteElementString("SOPAnims", Convert.ToBase64String(data)); | ||
1618 | } | ||
1619 | |||
1591 | writer.WriteEndElement(); | 1620 | writer.WriteEndElement(); |
1592 | } | 1621 | } |
1593 | 1622 | ||