patch from mantis #1632, thanks Melanie

0.6.0-stable
MW 2008-06-29 12:33:45 +00:00
parent f3f31744ab
commit 037b31f9db
3 changed files with 17 additions and 8 deletions

View File

@ -1905,7 +1905,7 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="vel"></param>
/// <param name="param"></param>
/// <returns></returns>
public virtual SceneObjectGroup RezObject(TaskInventoryItem item, LLVector3 pos, LLQuaternion rot, LLVector3 vel, int param)
public virtual SceneObjectGroup RezObject(SceneObjectPart sourcePart, TaskInventoryItem item, LLVector3 pos, LLQuaternion rot, LLVector3 vel, int param)
{
// Rez object
if (item != null)
@ -1941,6 +1941,8 @@ namespace OpenSim.Region.Environment.Scenes
List<SceneObjectPart> partList = new List<SceneObjectPart>(group.Children.Values);
if (rootPart.OwnerID != item.OwnerID)
{
if (ExternalChecks.ExternalChecksPropagatePermissions())
{
if ((item.OwnerMask & 8) != 0)
{
@ -1952,6 +1954,7 @@ namespace OpenSim.Region.Environment.Scenes
}
group.ApplyNextOwnerPermissions();
}
}
foreach (SceneObjectPart part in partList)
{
@ -1977,6 +1980,12 @@ namespace OpenSim.Region.Environment.Scenes
group.Velocity = vel;
group.CreateScriptInstances(param, true);
rootPart.ScheduleFullUpdate();
if (!ExternalChecks.ExternalChecksBypassPermissions())
{
if ((item.OwnerMask & (uint)PermissionMask.Copy) == 0)
sourcePart.RemoveInventoryItem(item.ItemID);
}
return rootPart.ParentGroup;
}
}

View File

@ -1993,7 +1993,7 @@ namespace OpenSim.Region.ScriptEngine.Common
// need the magnitude later
float velmag = (float)Util.GetMagnitude(llvel);
SceneObjectGroup new_group = World.RezObject(inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param);
SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param);
// If either of these are null, then there was an unknown error.
if (new_group == null)

View File

@ -1844,7 +1844,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
// need the magnitude later
float velmag = (float)Util.GetMagnitude(llvel);
SceneObjectGroup new_group = World.RezObject(inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param);
SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param);
// If either of these are null, then there was an unknown error.
if (new_group == null)