From 874140f950add3b698a3c75ab24727e62e83f329 Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Wed, 14 Mar 2012 23:33:22 +0100 Subject: [PATCH] fix Infinite loading on No Rez http://opensimulator.org/mantis/view.php?id=5932 --- .../Framework/InventoryAccess/InventoryAccessModule.cs | 5 +++++ OpenSim/Region/Framework/Scenes/Scene.cs | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index d320af4b81..1c84e7756f 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -935,6 +935,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) && (!isAttachment)) remoteClient.SendBulkUpdateInventory(item); + 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 : "Unknow", m_Scene.RegionInfo.RegionName)); + return false; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 44cd30a70b..954b76f129 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1971,10 +1971,16 @@ namespace OpenSim.Region.Framework.Scenes if (Permissions.CanRezObject(1, ownerID, pos)) { // rez ON the ground, not IN the ground - // pos.Z += 0.25F; The rez point should now be correct so that its not in the ground + // pos.Z += 0.25F; The rez point should now be correct so that its not in the ground AddNewPrim(ownerID, groupID, pos, rot, shape); } + else + { + IClientAPI client = null; + if (this.TryGetClient(ownerID, out client)) + client.SendAlertMessage("You cannot create objects here."); + } } public virtual SceneObjectGroup AddNewPrim(