reduced-complexity implementation of function to get rezzing object key

Signed-off-by: Melanie <melanie@t-data.com>
0.7.4.1
SignpostMarv 2012-08-02 11:19:33 +01:00 committed by Melanie
parent e36bc0d754
commit cd2c5843a8
5 changed files with 29 additions and 1 deletions

View File

@ -2131,7 +2131,8 @@ namespace OpenSim.Region.Framework.Scenes
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
sourcePart.Inventory.RemoveInventoryItem(item.ItemID);
}
group.RezzingObjectID = sourcePart.UUID;
AddNewSceneObject(group, true, pos, rot, vel);
// We can only call this after adding the scene object, since the scene object references the scene

View File

@ -610,6 +610,14 @@ namespace OpenSim.Region.Framework.Scenes
/// </remarks>
public UUID FromItemID { get; set; }
/// <summary>
/// Refers to the SceneObjectPart.UUID property of the object that this object was rezzed from, if applicable.
/// </summary>
/// <remarks>
/// If not applicable will be UUID.Zero
/// </remarks>
public UUID RezzingObjectID { get; set; }
/// <summary>
/// The folder ID that this object was rezzed from, if applicable.
/// </summary>

View File

@ -3314,5 +3314,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return Math.Max(a, b);
}
public LSL_Key osGetRezzingObject()
{
CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject");
m_host.AddScriptLPS(1);
return new LSL_Key(m_host.ParentGroup.RezzingObjectID.ToString());
}
}
}

View File

@ -299,5 +299,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
/// <param name="b"></param>
/// <returns></returns>
LSL_Float osMax(double a, double b);
/// <summary>
/// Get the key of the object that rezzed this object.
/// </summary>
/// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns>
LSL_Key osGetRezzingObject();
}
}

View File

@ -945,5 +945,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
return m_OSSL_Functions.osMax(a, b);
}
public LSL_Key osGetRezzingObject()
{
return m_OSSL_Functions.osGetRezzingObject();
}
}
}