diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index eaf4ce2..ebada5a 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -807,7 +807,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
807 | } | 807 | } |
808 | } | 808 | } |
809 | 809 | ||
810 | if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, attachment)) | 810 | if (item != null && !DoPreRezWhenFromItem(remoteClient, item, objlist, pos, veclist, attachment)) |
811 | return null; | 811 | return null; |
812 | 812 | ||
813 | for (int i = 0; i < objlist.Count; i++) | 813 | for (int i = 0; i < objlist.Count; i++) |
@@ -905,10 +905,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
905 | /// <param name="item"></param> | 905 | /// <param name="item"></param> |
906 | /// <param name="objlist"></param> | 906 | /// <param name="objlist"></param> |
907 | /// <param name="pos"></param> | 907 | /// <param name="pos"></param> |
908 | /// <param name="veclist"> | ||
909 | /// List of vector position adjustments for a coalesced objects. For ordinary objects | ||
910 | /// this list will contain just Vector3.Zero. The order of adjustments must match the order of objlist | ||
911 | /// </param> | ||
908 | /// <param name="isAttachment"></param> | 912 | /// <param name="isAttachment"></param> |
909 | /// <returns>true if we can processed with rezzing, false if we need to abort</returns> | 913 | /// <returns>true if we can processed with rezzing, false if we need to abort</returns> |
910 | private bool DoPreRezWhenFromItem( | 914 | private bool DoPreRezWhenFromItem( |
911 | IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist, Vector3 pos, bool isAttachment) | 915 | IClientAPI remoteClient, InventoryItemBase item, List<SceneObjectGroup> objlist, |
916 | Vector3 pos, List<Vector3> veclist, bool isAttachment) | ||
912 | { | 917 | { |
913 | UUID fromUserInventoryItemId = UUID.Zero; | 918 | UUID fromUserInventoryItemId = UUID.Zero; |
914 | 919 | ||
@@ -932,27 +937,29 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
932 | } | 937 | } |
933 | 938 | ||
934 | int primcount = 0; | 939 | int primcount = 0; |
935 | foreach (SceneObjectGroup g in objlist) | 940 | for(int i = 0; i < objlist.Count; i++) |
936 | primcount += g.PrimCount; | ||
937 | |||
938 | if (!m_Scene.Permissions.CanRezObject( | ||
939 | primcount, remoteClient.AgentId, pos) | ||
940 | && !isAttachment) | ||
941 | { | 941 | { |
942 | // The client operates in no fail mode. It will | 942 | SceneObjectGroup g = objlist[i]; |
943 | // have already removed the item from the folder | 943 | |
944 | // if it's no copy. | 944 | if (!m_Scene.Permissions.CanRezObject( |
945 | // Put it back if it's not an attachment | 945 | g.PrimCount, remoteClient.AgentId, pos + veclist[i]) |
946 | // | 946 | && !isAttachment) |
947 | if (((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) && (!isAttachment)) | 947 | { |
948 | remoteClient.SendBulkUpdateInventory(item); | 948 | // The client operates in no fail mode. It will |
949 | // have already removed the item from the folder | ||
950 | // if it's no copy. | ||
951 | // Put it back if it's not an attachment | ||
952 | // | ||
953 | if (((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) && (!isAttachment)) | ||
954 | remoteClient.SendBulkUpdateInventory(item); | ||
949 | 955 | ||
950 | ILandObject land = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y); | 956 | ILandObject land = m_Scene.LandChannel.GetLandObject(pos.X, pos.Y); |
951 | remoteClient.SendAlertMessage(string.Format( | 957 | remoteClient.SendAlertMessage(string.Format( |
952 | "Can't rez object '{0}' at <{1:F3}, {2:F3}, {3:F3}> on parcel '{4}' in region {5}.", | 958 | "Can't rez object '{0}' at <{1:F3}, {2:F3}, {3:F3}> on parcel '{4}' in region {5}.", |
953 | item.Name, pos.X, pos.Y, pos.Z, land != null ? land.LandData.Name : "Unknown", m_Scene.RegionInfo.RegionName)); | 959 | item.Name, pos.X, pos.Y, pos.Z, land != null ? land.LandData.Name : "Unknown", m_Scene.Name)); |
954 | 960 | ||
955 | return false; | 961 | return false; |
962 | } | ||
956 | } | 963 | } |
957 | 964 | ||
958 | for (int i = 0; i < objlist.Count; i++) | 965 | for (int i = 0; i < objlist.Count; i++) |