When rezzing a coalesced object, check adjust position of all components.
parent
d2367968e4
commit
0f008d5f7d
|
@ -807,7 +807,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment))
|
if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, veclist, attachment))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
for (int i = 0; i < objlist.Count; i++)
|
for (int i = 0; i < objlist.Count; i++)
|
||||||
|
@ -905,10 +905,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
/// <param name="item"></param>
|
/// <param name="item"></param>
|
||||||
/// <param name="objlist"></param>
|
/// <param name="objlist"></param>
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
|
/// <param name="veclist">
|
||||||
|
/// List of vector position adjustments for a coalesced objects. For ordinary objects
|
||||||
|
/// this list will contain just Vector3.Zero. The order of adjustments must match the order of objlist
|
||||||
|
/// </param>
|
||||||
/// <param name="isAttachment"></param>
|
/// <param name="isAttachment"></param>
|
||||||
/// <returns>true if we can processed with rezzing, false if we need to abort</returns>
|
/// <returns>true if we can processed with rezzing, false if we need to abort</returns>
|
||||||
private bool DoPreRezWhenFromItem(
|
private bool DoPreRezWhenFromItem(
|
||||||
IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist, Vector3 pos, bool isAttachment)
|
IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist,
|
||||||
|
Vector3 pos, List<Vector3> veclist, bool isAttachment)
|
||||||
{
|
{
|
||||||
UUID fromUserInventoryItemId = UUID.Zero;
|
UUID fromUserInventoryItemId = UUID.Zero;
|
||||||
|
|
||||||
|
@ -932,27 +937,29 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
int primcount = 0;
|
int primcount = 0;
|
||||||
foreach (SceneObjectGroup g in objlist)
|
for(int i = 0; i < objlist.Count; i++)
|
||||||
primcount += g.PrimCount;
|
|
||||||
|
|
||||||
if (!m_Scene.Permissions.CanRezObject(
|
|
||||||
primcount, remoteClient.AgentId, pos)
|
|
||||||
&& !isAttachment)
|
|
||||||
{
|
{
|
||||||
// The client operates in no fail mode. It will
|
SceneObjectGroup g = objlist[i];
|
||||||
// have already removed the item from the folder
|
|
||||||
// if it's no copy.
|
|
||||||
// Put it back if it's not an attachment
|
|
||||||
//
|
|
||||||
if (((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) && (!isAttachment))
|
|
||||||
remoteClient.SendBulkUpdateInventory(item);
|
|
||||||
|
|
||||||
ILandObject land = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y);
|
if (!m_Scene.Permissions.CanRezObject(
|
||||||
remoteClient.SendAlertMessage(string.Format(
|
g.PrimCount, remoteClient.AgentId, pos + veclist[i])
|
||||||
"Can't rez object '{0}' at <{1:F3}, {2:F3}, {3:F3}> on parcel '{4}' in region {5}.",
|
&& !isAttachment)
|
||||||
item.Name, pos.X, pos.Y, pos.Z, land != null ? land.LandData.Name : "Unknown", m_Scene.RegionInfo.RegionName));
|
{
|
||||||
|
// The client operates in no fail mode. It will
|
||||||
|
// have already removed the item from the folder
|
||||||
|
// if it's no copy.
|
||||||
|
// Put it back if it's not an attachment
|
||||||
|
//
|
||||||
|
if (((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) && (!isAttachment))
|
||||||
|
remoteClient.SendBulkUpdateInventory(item);
|
||||||
|
|
||||||
return false;
|
ILandObject land = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y);
|
||||||
|
remoteClient.SendAlertMessage(string.Format(
|
||||||
|
"Can't rez object '{0}' at <{1:F3}, {2:F3}, {3:F3}> on parcel '{4}' in region {5}.",
|
||||||
|
item.Name, pos.X, pos.Y, pos.Z, land != null ? land.LandData.Name : "Unknown", m_Scene.Name));
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < objlist.Count; i++)
|
for (int i = 0; i < objlist.Count; i++)
|
||||||
|
|
Loading…
Reference in New Issue