add a bit more persistence (still mysql only)
parent
d8ade44fe9
commit
d841c593b9
|
@ -5750,7 +5750,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (AnimationsNames == null)
|
||||
return null;
|
||||
|
||||
|
||||
lock (animsLock)
|
||||
{
|
||||
if (AnimationsNames.Count == 0)
|
||||
|
|
|
@ -235,7 +235,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
if (doScriptStates)
|
||||
sceneObject.SaveScriptedState(writer);
|
||||
|
||||
|
||||
if (!noRootElement)
|
||||
writer.WriteEndElement(); // SceneObjectGroup
|
||||
|
||||
|
@ -499,6 +498,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
m_SOPXmlProcessors.Add("SoundRadius", ProcessSoundRadius);
|
||||
m_SOPXmlProcessors.Add("SoundQueueing", ProcessSoundQueueing);
|
||||
|
||||
m_SOPXmlProcessors.Add("SOPAnims", ProcessSOPAnims);
|
||||
|
||||
#endregion
|
||||
|
||||
#region TaskInventoryXmlProcessors initialization
|
||||
|
@ -826,6 +827,27 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
}
|
||||
}
|
||||
|
||||
private static void ProcessSOPAnims(SceneObjectPart obj, XmlReader reader)
|
||||
{
|
||||
obj.Animations = null;
|
||||
try
|
||||
{
|
||||
string datastr;
|
||||
datastr = reader.ReadElementContentAsString();
|
||||
if(string.IsNullOrEmpty(datastr))
|
||||
return;
|
||||
|
||||
byte[] pdata = Convert.FromBase64String(datastr);
|
||||
obj.DeSerializeAnimations(pdata);
|
||||
return;
|
||||
}
|
||||
catch {}
|
||||
|
||||
m_log.DebugFormat(
|
||||
"[SceneObjectSerializer]: Parsing ProcessSOPAnims for object part {0} {1} encountered errors",
|
||||
obj.Name, obj.UUID);
|
||||
}
|
||||
|
||||
private static void ProcessShape(SceneObjectPart obj, XmlReader reader)
|
||||
{
|
||||
List<string> errorNodeNames;
|
||||
|
@ -1588,6 +1610,13 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
|||
}
|
||||
writer.WriteElementString("SoundQueueing", sop.SoundQueueing.ToString().ToLower());
|
||||
|
||||
if (sop.Animations != null)
|
||||
{
|
||||
Byte[] data = sop.SerializeAnimations();
|
||||
if(data != null && data.Length > 0)
|
||||
writer.WriteElementString("SOPAnims", Convert.ToBase64String(data));
|
||||
}
|
||||
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue