From dac32c4e5acd76a3b42dede1c573dbef1a98c7e1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 20 Jan 2017 14:26:24 +0000 Subject: change CanObjectEntry() to use a SOG --- OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 6 +++--- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 9845418..6925b6c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs @@ -52,7 +52,7 @@ namespace OpenSim.Region.Framework.Scenes public delegate bool EditObjectHandler(SceneObjectGroup sog, ScenePresence sp); public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene); public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); - public delegate bool ObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene); + public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint, Scene scene); public delegate bool ReturnObjectsHandler(ILandObject land, UUID user, List objects, Scene scene); public delegate bool InstantMessageHandler(UUID user, UUID target, Scene startScene); public delegate bool InventoryTransferHandler(UUID user, UUID target, Scene startScene); @@ -504,7 +504,7 @@ namespace OpenSim.Region.Framework.Scenes #endregion #region OBJECT ENTRY - public bool CanObjectEntry(UUID objectID, bool enteringRegion, Vector3 newPoint) + public bool CanObjectEntry(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint) { ObjectEntryHandler handler = OnObjectEntry; if (handler != null) @@ -512,7 +512,7 @@ namespace OpenSim.Region.Framework.Scenes Delegate[] list = handler.GetInvocationList(); foreach (ObjectEntryHandler h in list) { - if (h(objectID, enteringRegion, newPoint, m_scene) == false) + if (h(sog, enteringRegion, newPoint, m_scene) == false) return false; } } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 9264138..8fc438d 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1579,7 +1579,7 @@ namespace OpenSim.Region.Framework.Scenes else { if (m_parentScene.Permissions.CanMoveObject(group, remoteClient) - && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos)) + && m_parentScene.Permissions.CanObjectEntry(group, false, pos)) { group.UpdateGroupPosition(pos); } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index d14c450..83c5db4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -4656,7 +4656,7 @@ namespace OpenSim.Region.Framework.Scenes } if ((change & ObjectChangeType.Position) != 0) { - if (IsAttachment || m_scene.Permissions.CanObjectEntry(group.UUID, false, data.position)) + if (IsAttachment || m_scene.Permissions.CanObjectEntry(group, false, data.position)) UpdateGroupPosition(data.position); updateType = updatetype.groupterse; } -- cgit v1.1