aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs13
1 files changed, 11 insertions, 2 deletions
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
936 return permission; 936 return permission;
937 } 937 }
938 938
939 private bool CanObjectEntry(UUID objectID, Vector3 newPoint, Scene scene) 939 private bool CanObjectEntry(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene)
940 { 940 {
941 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 941 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
942 if (m_bypassPermissions) return m_bypassPermissionsValue; 942 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -946,8 +946,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
946 return true; 946 return true;
947 } 947 }
948 948
949 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
950
949 ILandObject land = m_scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y); 951 ILandObject land = m_scene.LandChannel.GetLandObject(newPoint.X, newPoint.Y);
950 952
953 if(!enteringRegion)
954 {
955 ILandObject fromland = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
956
957 if (fromland == land) // Not entering
958 return true;
959 }
960
951 if (land == null) 961 if (land == null)
952 { 962 {
953 return false; 963 return false;
@@ -971,7 +981,6 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
971 return false; 981 return false;
972 } 982 }
973 983
974 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
975 984
976 if (GenericParcelPermission(task.OwnerID, newPoint)) 985 if (GenericParcelPermission(task.OwnerID, newPoint))
977 { 986 {