diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Permissions.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 8194606..b2801ea 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
50 | public delegate bool DuplicateObjectHandler(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition); | 50 | public delegate bool DuplicateObjectHandler(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition); |
51 | public delegate bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene); | 51 | public delegate bool EditObjectHandler(UUID objectID, UUID editorID, Scene scene); |
52 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene); | 52 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene); |
53 | public delegate bool MoveObjectHandler(UUID objectID, UUID moverID, Scene scene); | 53 | public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); |
54 | public delegate bool ObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene); | 54 | public delegate bool ObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene); |
55 | public delegate bool ReturnObjectsHandler(ILandObject land, UUID user, List<SceneObjectGroup> objects, Scene scene); | 55 | public delegate bool ReturnObjectsHandler(ILandObject land, UUID user, List<SceneObjectGroup> objects, Scene scene); |
56 | public delegate bool InstantMessageHandler(UUID user, UUID target, Scene startScene); | 56 | public delegate bool InstantMessageHandler(UUID user, UUID target, Scene startScene); |
@@ -450,15 +450,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
450 | #endregion | 450 | #endregion |
451 | 451 | ||
452 | #region MOVE OBJECT | 452 | #region MOVE OBJECT |
453 | public bool CanMoveObject(UUID objectID, UUID moverID) | 453 | public bool CanMoveObject(SceneObjectGroup sog, IClientAPI client) |
454 | { | 454 | { |
455 | if(sog == null || client == null) | ||
456 | return false; | ||
457 | |||
458 | ScenePresence sp = client.SceneAgent as ScenePresence; | ||
459 | if(sp == null) | ||
460 | return false; | ||
461 | |||
455 | MoveObjectHandler handler = OnMoveObject; | 462 | MoveObjectHandler handler = OnMoveObject; |
456 | if (handler != null) | 463 | if (handler != null) |
457 | { | 464 | { |
458 | Delegate[] list = handler.GetInvocationList(); | 465 | Delegate[] list = handler.GetInvocationList(); |
459 | foreach (MoveObjectHandler h in list) | 466 | foreach (MoveObjectHandler h in list) |
460 | { | 467 | { |
461 | if (h(objectID, moverID, m_scene) == false) | 468 | if (h(sog, sp) == false) |
462 | return false; | 469 | return false; |
463 | } | 470 | } |
464 | } | 471 | } |