mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Fix bug where an avatar that had an object they owned attached through llAttachToAvatar() or osForceAttachToAvatar() would wrongly have next permissions come into play when they detached that object and rezzed it in scene.
This is because the attachments module code was setting the 'object slam' bit by using PermissionMask.All Solution here is to route the attachment item creation call through the existing inventory code in BasicInventoryAccessModule rather than copy/pasted code in AttachmentsModule itself.
This commit is contained in:
@@ -47,14 +47,30 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||
/// </remarks>
|
||||
public class CoalescedSceneObjectsSerializer
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
/// Serialize coalesced objects to Xml
|
||||
/// </summary>
|
||||
/// <param name="coa"></param>
|
||||
/// <param name="doScriptStates">
|
||||
/// If true then serialize script states. This will halt any running scripts
|
||||
/// </param>
|
||||
/// <returns></returns>
|
||||
public static string ToXml(CoalescedSceneObjects coa)
|
||||
{
|
||||
return ToXml(coa, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serialize coalesced objects to Xml
|
||||
/// </summary>
|
||||
/// <param name="coa"></param>
|
||||
/// <param name="doScriptStates">
|
||||
/// If true then serialize script states. This will halt any running scripts
|
||||
/// </param>
|
||||
/// <returns></returns>
|
||||
public static string ToXml(CoalescedSceneObjects coa, bool doScriptStates)
|
||||
{
|
||||
using (StringWriter sw = new StringWriter())
|
||||
{
|
||||
@@ -91,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
|
||||
writer.WriteAttributeString("offsety", offsets[i].Y.ToString());
|
||||
writer.WriteAttributeString("offsetz", offsets[i].Z.ToString());
|
||||
|
||||
SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, true);
|
||||
SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates);
|
||||
|
||||
writer.WriteEndElement(); // SceneObjectGroup
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user