From 691c4bc756b9565e648ff8ad88cfbfabd1b0be76 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 22 Nov 2008 00:23:48 +0000 Subject: Mantis #2442 Attempt to reinstate the Object Entry flag in parcel settings --- .../Modules/World/Permissions/PermissionsModule.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/World/Permissions') diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 9eeff0f..681182e 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -936,7 +936,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return permission; } - private bool CanObjectEntry(UUID objectID, Vector3 newPoint, Scene scene) + private bool CanObjectEntry(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene) { DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; @@ -946,8 +946,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return true; } + SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; + ILandObject land = m_scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); + if(!enteringRegion) + { + ILandObject fromland = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); + + if (fromland == land) // Not entering + return true; + } + if (land == null) { return false; @@ -971,7 +981,6 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions return false; } - SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; if (GenericParcelPermission(task.OwnerID, newPoint)) { -- cgit v1.1