aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorMW2007-10-12 15:26:19 +0000
committerMW2007-10-12 15:26:19 +0000
commita19ec6fc5454496ecbeb7cbda566c45050bd4fe4 (patch)
treedaccb99ed4688f5055df613b57a35c96c75175b9 /OpenSim/Region/Environment
parentTurn a few of the writelines into mainlog entries so failed logins can be mor... (diff)
downloadopensim-SC_OLD-a19ec6fc5454496ecbeb7cbda566c45050bd4fe4.zip
opensim-SC_OLD-a19ec6fc5454496ecbeb7cbda566c45050bd4fe4.tar.gz
opensim-SC_OLD-a19ec6fc5454496ecbeb7cbda566c45050bd4fe4.tar.bz2
opensim-SC_OLD-a19ec6fc5454496ecbeb7cbda566c45050bd4fe4.tar.xz
Just trying out some thing with events, there changes/additions are likely to be temporary.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneEvents.cs24
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs3
2 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
index 4f0ffc7..e62a8f8 100644
--- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs
@@ -60,6 +60,14 @@ namespace OpenSim.Region.Environment.Scenes
60 60
61 public event RemoveScript OnRemoveScript; 61 public event RemoveScript OnRemoveScript;
62 62
63 public delegate void SceneGroupMoved(LLUUID groupID, LLVector3 delta);
64
65 public event SceneGroupMoved OnSceneGroupMove;
66
67 public delegate void SceneGroupGrabed(LLUUID groupID, LLVector3 offset);
68
69 public event SceneGroupGrabed OnSceneGroupGrab;
70
63 public void TriggerPermissionError(LLUUID user, string reason) 71 public void TriggerPermissionError(LLUUID user, string reason)
64 { 72 {
65 if (OnPermissionError != null) 73 if (OnPermissionError != null)
@@ -153,5 +161,21 @@ namespace OpenSim.Region.Environment.Scenes
153 OnRemoveScript(localID, itemID); 161 OnRemoveScript(localID, itemID);
154 } 162 }
155 } 163 }
164
165 public void TriggerGroupMove(LLUUID groupID, LLVector3 delta)
166 {
167 if (OnSceneGroupMove != null)
168 {
169 OnSceneGroupMove(groupID, delta);
170 }
171 }
172
173 public void TriggerGroupGrab(LLUUID groupID, LLVector3 offset)
174 {
175 if (OnSceneGroupGrab != null)
176 {
177 OnSceneGroupGrab(groupID, offset);
178 }
179 }
156 } 180 }
157} \ No newline at end of file 181} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 5ff0d72..45db5f7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -931,6 +931,8 @@ namespace OpenSim.Region.Environment.Scenes
931 { 931 {
932 AbsolutePosition = pos; 932 AbsolutePosition = pos;
933 ScheduleGroupForTerseUpdate(); 933 ScheduleGroupForTerseUpdate();
934
935 m_scene.EventManager.TriggerGroupMove(this.UUID, pos);
934 } 936 }
935 937
936 /// <summary> 938 /// <summary>
@@ -1279,6 +1281,7 @@ namespace OpenSim.Region.Environment.Scenes
1279 1281
1280 public virtual void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient) 1282 public virtual void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient)
1281 { 1283 {
1284 m_scene.EventManager.TriggerGroupGrab(this.UUID, offsetPos);
1282 } 1285 }
1283 1286
1284 public void DeleteGroup() 1287 public void DeleteGroup()