aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-22 00:23:48 +0000
committerMelanie Thielker2008-11-22 00:23:48 +0000
commit691c4bc756b9565e648ff8ad88cfbfabd1b0be76 (patch)
tree252ba1f51e6c7c8f6eef8431869d83b704ec2803 /OpenSim/Region/Environment
parentIntroducing IPresenceModule (diff)
downloadopensim-SC-691c4bc756b9565e648ff8ad88cfbfabd1b0be76.zip
opensim-SC-691c4bc756b9565e648ff8ad88cfbfabd1b0be76.tar.gz
opensim-SC-691c4bc756b9565e648ff8ad88cfbfabd1b0be76.tar.bz2
opensim-SC-691c4bc756b9565e648ff8ad88cfbfabd1b0be76.tar.xz
Mantis #2442
Attempt to reinstate the Object Entry flag in parcel settings
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs13
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Permissions.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneGraph.cs2
4 files changed, 18 insertions, 7 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 {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs b/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs
index 3a5a3d1..5f3b100 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Permissions.cs
@@ -403,7 +403,7 @@ namespace OpenSim.Region.Environment.Scenes
403 #endregion 403 #endregion
404 404
405 #region OBJECT ENTRY 405 #region OBJECT ENTRY
406 public delegate bool CanObjectEntryHandler(UUID objectID, Vector3 newPoint, Scene scene); 406 public delegate bool CanObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene);
407 private List<CanObjectEntryHandler> CanObjectEntryCheckFunctions = new List<CanObjectEntryHandler>(); 407 private List<CanObjectEntryHandler> CanObjectEntryCheckFunctions = new List<CanObjectEntryHandler>();
408 408
409 public void AddObjectEntryHandler(CanObjectEntryHandler delegateFunc) 409 public void AddObjectEntryHandler(CanObjectEntryHandler delegateFunc)
@@ -418,11 +418,11 @@ namespace OpenSim.Region.Environment.Scenes
418 CanObjectEntryCheckFunctions.Remove(delegateFunc); 418 CanObjectEntryCheckFunctions.Remove(delegateFunc);
419 } 419 }
420 420
421 public bool CanObjectEntry(UUID objectID, Vector3 newPoint) 421 public bool CanObjectEntry(UUID objectID, bool enteringRegion, Vector3 newPoint)
422 { 422 {
423 foreach (CanObjectEntryHandler check in CanObjectEntryCheckFunctions) 423 foreach (CanObjectEntryHandler check in CanObjectEntryCheckFunctions)
424 { 424 {
425 if (check(objectID, newPoint, m_scene) == false) 425 if (check(objectID, enteringRegion, newPoint, m_scene) == false)
426 { 426 {
427 return false; 427 return false;
428 } 428 }
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 723f874..2fcca43 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2157,12 +2157,14 @@ namespace OpenSim.Region.Environment.Scenes
2157 if (XMLMethod == 0) 2157 if (XMLMethod == 0)
2158 { 2158 {
2159 SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData); 2159 SceneObjectGroup sceneObject = m_serialiser.DeserializeGroupFromXml2(objXMLData);
2160
2160 AddRestoredSceneObject(sceneObject, true, false); 2161 AddRestoredSceneObject(sceneObject, true, false);
2161 2162
2162 SceneObjectPart RootPrim = GetSceneObjectPart(primID); 2163 SceneObjectPart RootPrim = GetSceneObjectPart(primID);
2163 if (RootPrim != null) 2164 if (RootPrim != null)
2164 { 2165 {
2165 if (m_regInfo.EstateSettings.IsBanned(RootPrim.OwnerID)) 2166 if (m_regInfo.EstateSettings.IsBanned(RootPrim.OwnerID) ||
2167 Permissions.CanObjectEntry(RootPrim.UUID, true, RootPrim.AbsolutePosition))
2166 { 2168 {
2167 SceneObjectGroup grp = RootPrim.ParentGroup; 2169 SceneObjectGroup grp = RootPrim.ParentGroup;
2168 if (grp != null) 2170 if (grp != null)
diff --git a/OpenSim/Region/Environment/Scenes/SceneGraph.cs b/OpenSim/Region/Environment/Scenes/SceneGraph.cs
index 4c15da2..f1ef6c3 100644
--- a/OpenSim/Region/Environment/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneGraph.cs
@@ -1185,7 +1185,7 @@ namespace OpenSim.Region.Environment.Scenes
1185 } 1185 }
1186 else 1186 else
1187 { 1187 {
1188 if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId) || group.IsAttachment) 1188 if ((m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId) && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos)) || group.IsAttachment)
1189 { 1189 {
1190 group.UpdateGroupPosition(pos); 1190 group.UpdateGroupPosition(pos);
1191 } 1191 }