Merge branch 'master' of ssh://MyConnection/var/git/opensim
commit
a132edbdae
|
@ -2694,7 +2694,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void PreloadSound(string sound)
|
public void PreloadSound(string sound)
|
||||||
{
|
{
|
||||||
// UUID ownerID = OwnerID;
|
// UUID ownerID = OwnerID;
|
||||||
UUID objectID = UUID;
|
UUID objectID = ParentGroup.RootPart.UUID;
|
||||||
UUID soundID = UUID.Zero;
|
UUID soundID = UUID.Zero;
|
||||||
|
|
||||||
if (!UUID.TryParse(sound, out soundID))
|
if (!UUID.TryParse(sound, out soundID))
|
||||||
|
@ -3101,7 +3101,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
volume = 0;
|
volume = 0;
|
||||||
|
|
||||||
UUID ownerID = _ownerID;
|
UUID ownerID = _ownerID;
|
||||||
UUID objectID = UUID;
|
UUID objectID = ParentGroup.RootPart.UUID;
|
||||||
UUID parentID = GetRootPartUUID();
|
UUID parentID = GetRootPartUUID();
|
||||||
UUID soundID = UUID.Zero;
|
UUID soundID = UUID.Zero;
|
||||||
Vector3 position = AbsolutePosition; // region local
|
Vector3 position = AbsolutePosition; // region local
|
||||||
|
@ -3138,11 +3138,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
else
|
else
|
||||||
soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
|
soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
|
||||||
ParentGroup.PlaySoundMasterPrim = this;
|
ParentGroup.PlaySoundMasterPrim = this;
|
||||||
ownerID = this._ownerID;
|
ownerID = _ownerID;
|
||||||
objectID = this.UUID;
|
objectID = ParentGroup.RootPart.UUID;
|
||||||
parentID = this.GetRootPartUUID();
|
parentID = GetRootPartUUID();
|
||||||
position = this.AbsolutePosition; // region local
|
position = AbsolutePosition; // region local
|
||||||
regionHandle = this.ParentGroup.Scene.RegionInfo.RegionHandle;
|
regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
|
||||||
if (triggered)
|
if (triggered)
|
||||||
soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius);
|
soundModule.TriggerSound(soundID, ownerID, objectID, parentID, volume, position, regionHandle, radius);
|
||||||
else
|
else
|
||||||
|
@ -3150,7 +3150,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
|
foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
|
||||||
{
|
{
|
||||||
ownerID = prim._ownerID;
|
ownerID = prim._ownerID;
|
||||||
objectID = prim.UUID;
|
objectID = prim.ParentGroup.RootPart.UUID;
|
||||||
parentID = prim.GetRootPartUUID();
|
parentID = prim.GetRootPartUUID();
|
||||||
position = prim.AbsolutePosition; // region local
|
position = prim.AbsolutePosition; // region local
|
||||||
regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle;
|
regionHandle = prim.ParentGroup.Scene.RegionInfo.RegionHandle;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -124,14 +124,30 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
|
foreach (XmlNode aPrimNode in rootNode.ChildNodes)
|
||||||
{
|
{
|
||||||
// There is only ever one prim. This oddity should be removeable post 0.5.9
|
// There is only ever one prim. This oddity should be removeable post 0.5.9
|
||||||
return SceneObjectSerializer.FromXml2Format(aPrimNode.OuterXml);
|
//return SceneObjectSerializer.FromXml2Format(aPrimNode.OuterXml);
|
||||||
|
using (reader = new XmlTextReader(new StringReader(aPrimNode.OuterXml)))
|
||||||
|
{
|
||||||
|
SceneObjectGroup obj = new SceneObjectGroup();
|
||||||
|
if (SceneObjectSerializer.Xml2ToSOG(reader, obj))
|
||||||
|
return obj;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return SceneObjectSerializer.FromXml2Format(rootNode.OuterXml);
|
//return SceneObjectSerializer.FromXml2Format(rootNode.OuterXml);
|
||||||
|
using (reader = new XmlTextReader(new StringReader(rootNode.OuterXml)))
|
||||||
|
{
|
||||||
|
SceneObjectGroup obj = new SceneObjectGroup();
|
||||||
|
if (SceneObjectSerializer.Xml2ToSOG(reader, obj))
|
||||||
|
return obj;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,13 +209,18 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||||
/// <returns>The scene object created. null if the scene object already existed</returns>
|
/// <returns>The scene object created. null if the scene object already existed</returns>
|
||||||
protected static SceneObjectGroup CreatePrimFromXml2(Scene scene, string xmlData)
|
protected static SceneObjectGroup CreatePrimFromXml2(Scene scene, string xmlData)
|
||||||
{
|
{
|
||||||
SceneObjectGroup obj = SceneObjectSerializer.FromXml2Format(xmlData);
|
//SceneObjectGroup obj = SceneObjectSerializer.FromXml2Format(xmlData);
|
||||||
|
using (XmlTextReader reader = new XmlTextReader(new StringReader(xmlData)))
|
||||||
|
{
|
||||||
|
SceneObjectGroup obj = new SceneObjectGroup();
|
||||||
|
SceneObjectSerializer.Xml2ToSOG(reader, obj);
|
||||||
|
|
||||||
if (scene.AddRestoredSceneObject(obj, true, false))
|
if (scene.AddRestoredSceneObject(obj, true, false))
|
||||||
return obj;
|
return obj;
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void SavePrimsToXml2(Scene scene, string fileName)
|
public static void SavePrimsToXml2(Scene scene, string fileName)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue