From c1d66a85646eeae9011265bdf26157ccbaed2421 Mon Sep 17 00:00:00 2001
From: MW
Date: Fri, 30 Nov 2007 12:10:12 +0000
Subject: small change to OnSceneGroupMove event (in SceneEvents.cs)
---
OpenSim/Region/Environment/Scenes/SceneEvents.cs | 7 ++++---
OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 17 ++++++++++-------
2 files changed, 14 insertions(+), 10 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 0986654..e058745 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Scenes
public event RemoveScript OnRemoveScript;
- public delegate void SceneGroupMoved(LLUUID groupID, LLVector3 delta);
+ public delegate bool SceneGroupMoved(LLUUID groupID, LLVector3 delta);
public event SceneGroupMoved OnSceneGroupMove;
@@ -194,12 +194,13 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- public void TriggerGroupMove(LLUUID groupID, LLVector3 delta)
+ public bool TriggerGroupMove(LLUUID groupID, LLVector3 delta)
{
if (OnSceneGroupMove != null)
{
- OnSceneGroupMove(groupID, delta);
+ return OnSceneGroupMove(groupID, delta);
}
+ return true;
}
public void TriggerGroupGrab(LLUUID groupID, LLVector3 offset, LLUUID userID)
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 1b55a49..8038a83 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -972,9 +972,11 @@ namespace OpenSim.Region.Environment.Scenes
///
public void GrabMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
{
- AbsolutePosition = pos;
- m_rootPart.SendTerseUpdateToAllClients();
- m_scene.EventManager.TriggerGroupMove(UUID, pos);
+ if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
+ {
+ AbsolutePosition = pos;
+ m_rootPart.SendTerseUpdateToAllClients();
+ }
}
///
@@ -1263,10 +1265,11 @@ namespace OpenSim.Region.Environment.Scenes
///
public void UpdateGroupPosition(LLVector3 pos)
{
- AbsolutePosition = pos;
- ScheduleGroupForTerseUpdate();
-
- m_scene.EventManager.TriggerGroupMove(UUID, pos);
+ if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
+ {
+ AbsolutePosition = pos;
+ ScheduleGroupForTerseUpdate();
+ }
}
///
--
cgit v1.1