diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 8f0b866..fe40f52 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -92,8 +92,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
92 | public delegate void OnShutdownDelegate(); | 92 | public delegate void OnShutdownDelegate(); |
93 | 93 | ||
94 | public event OnShutdownDelegate OnShutdown; | 94 | public event OnShutdownDelegate OnShutdown; |
95 | 95 | ||
96 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | ||
97 | public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | 96 | public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); |
98 | public delegate void ScriptResetDelegate(uint localID, UUID itemID); | 97 | public delegate void ScriptResetDelegate(uint localID, UUID itemID); |
99 | 98 | ||
@@ -103,62 +102,57 @@ namespace OpenSim.Region.Framework.Scenes | |||
103 | 102 | ||
104 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; | 103 | public event OnSetRootAgentSceneDelegate OnSetRootAgentScene; |
105 | 104 | ||
105 | /// <summary> | ||
106 | /// Called when an object is touched/grabbed. | ||
107 | /// </summary> | ||
108 | /// The originalID is the local ID of the part that was actually touched. The localID itself is always that of | ||
109 | /// the root part. | ||
110 | public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); | ||
106 | public event ObjectGrabDelegate OnObjectGrab; | 111 | public event ObjectGrabDelegate OnObjectGrab; |
112 | |||
113 | public event ObjectGrabDelegate OnObjectGrabbing; | ||
107 | public event ObjectDeGrabDelegate OnObjectDeGrab; | 114 | public event ObjectDeGrabDelegate OnObjectDeGrab; |
108 | public event ScriptResetDelegate OnScriptReset; | 115 | public event ScriptResetDelegate OnScriptReset; |
109 | 116 | ||
110 | public event OnPermissionErrorDelegate OnPermissionError; | 117 | public event OnPermissionErrorDelegate OnPermissionError; |
111 | 118 | ||
112 | public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); | 119 | public delegate void NewRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine, int stateSource); |
113 | |||
114 | public event NewRezScript OnRezScript; | 120 | public event NewRezScript OnRezScript; |
115 | 121 | ||
116 | public delegate void RemoveScript(uint localID, UUID itemID); | 122 | public delegate void RemoveScript(uint localID, UUID itemID); |
117 | |||
118 | public event RemoveScript OnRemoveScript; | 123 | public event RemoveScript OnRemoveScript; |
119 | 124 | ||
120 | public delegate void StartScript(uint localID, UUID itemID); | 125 | public delegate void StartScript(uint localID, UUID itemID); |
121 | |||
122 | public event StartScript OnStartScript; | 126 | public event StartScript OnStartScript; |
123 | 127 | ||
124 | public delegate void StopScript(uint localID, UUID itemID); | 128 | public delegate void StopScript(uint localID, UUID itemID); |
125 | |||
126 | public event StopScript OnStopScript; | 129 | public event StopScript OnStopScript; |
127 | 130 | ||
128 | public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); | 131 | public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); |
129 | |||
130 | public event SceneGroupMoved OnSceneGroupMove; | 132 | public event SceneGroupMoved OnSceneGroupMove; |
131 | 133 | ||
132 | public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID); | 134 | public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID); |
133 | |||
134 | public event SceneGroupGrabed OnSceneGroupGrab; | 135 | public event SceneGroupGrabed OnSceneGroupGrab; |
135 | 136 | ||
136 | public delegate bool SceneGroupSpinStarted(UUID groupID); | 137 | public delegate bool SceneGroupSpinStarted(UUID groupID); |
137 | |||
138 | public event SceneGroupSpinStarted OnSceneGroupSpinStart; | 138 | public event SceneGroupSpinStarted OnSceneGroupSpinStart; |
139 | 139 | ||
140 | public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation); | 140 | public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation); |
141 | |||
142 | public event SceneGroupSpun OnSceneGroupSpin; | 141 | public event SceneGroupSpun OnSceneGroupSpin; |
143 | 142 | ||
144 | public delegate void LandObjectAdded(ILandObject newParcel); | 143 | public delegate void LandObjectAdded(ILandObject newParcel); |
145 | |||
146 | public event LandObjectAdded OnLandObjectAdded; | 144 | public event LandObjectAdded OnLandObjectAdded; |
147 | 145 | ||
148 | public delegate void LandObjectRemoved(UUID globalID); | 146 | public delegate void LandObjectRemoved(UUID globalID); |
149 | |||
150 | public event LandObjectRemoved OnLandObjectRemoved; | 147 | public event LandObjectRemoved OnLandObjectRemoved; |
151 | 148 | ||
152 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); | 149 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); |
153 | |||
154 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; | 150 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; |
155 | 151 | ||
156 | public delegate void SignificantClientMovement(IClientAPI remote_client); | 152 | public delegate void SignificantClientMovement(IClientAPI remote_client); |
157 | |||
158 | public event SignificantClientMovement OnSignificantClientMovement; | 153 | public event SignificantClientMovement OnSignificantClientMovement; |
159 | 154 | ||
160 | public delegate void IncomingInstantMessage(GridInstantMessage message); | 155 | public delegate void IncomingInstantMessage(GridInstantMessage message); |
161 | |||
162 | public event IncomingInstantMessage OnIncomingInstantMessage; | 156 | public event IncomingInstantMessage OnIncomingInstantMessage; |
163 | 157 | ||
164 | public event IncomingInstantMessage OnUnhandledInstantMessage; | 158 | public event IncomingInstantMessage OnUnhandledInstantMessage; |
@@ -316,9 +310,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
316 | public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue; | 310 | public event EmptyScriptCompileQueue OnEmptyScriptCompileQueue; |
317 | 311 | ||
318 | /// <summary> | 312 | /// <summary> |
319 | /// Called whenever an object is attached, or detached | 313 | /// Called whenever an object is attached, or detached from an in-world presence. |
320 | /// from an in-world presence. | ||
321 | /// </summary> | 314 | /// </summary> |
315 | /// If the object is being attached, then the avatarID will be present. If the object is being detached then | ||
316 | /// the avatarID is UUID.Zero (I know, this doesn't make much sense but now it's historical). | ||
322 | public delegate void Attach(uint localID, UUID itemID, UUID avatarID); | 317 | public delegate void Attach(uint localID, UUID itemID, UUID avatarID); |
323 | public event Attach OnAttach; | 318 | public event Attach OnAttach; |
324 | 319 | ||
@@ -412,6 +407,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
412 | private OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = null; //OnParcelPrimCountAdd; | 407 | private OnParcelPrimCountAddDelegate handlerParcelPrimCountAdd = null; //OnParcelPrimCountAdd; |
413 | private OnShutdownDelegate handlerShutdown = null; //OnShutdown; | 408 | private OnShutdownDelegate handlerShutdown = null; //OnShutdown; |
414 | private ObjectGrabDelegate handlerObjectGrab = null; //OnObjectGrab; | 409 | private ObjectGrabDelegate handlerObjectGrab = null; //OnObjectGrab; |
410 | private ObjectGrabDelegate handlerObjectGrabbing = null; //OnObjectGrabbing; | ||
415 | private ObjectDeGrabDelegate handlerObjectDeGrab = null; //OnObjectDeGrab; | 411 | private ObjectDeGrabDelegate handlerObjectDeGrab = null; //OnObjectDeGrab; |
416 | private ScriptResetDelegate handlerScriptReset = null; // OnScriptReset | 412 | private ScriptResetDelegate handlerScriptReset = null; // OnScriptReset |
417 | private NewRezScript handlerRezScript = null; //OnRezScript; | 413 | private NewRezScript handlerRezScript = null; //OnRezScript; |
@@ -626,6 +622,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
626 | } | 622 | } |
627 | } | 623 | } |
628 | 624 | ||
625 | public void TriggerObjectGrabbing(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) | ||
626 | { | ||
627 | handlerObjectGrabbing = OnObjectGrabbing; | ||
628 | if (handlerObjectGrabbing != null) | ||
629 | { | ||
630 | handlerObjectGrabbing(localID, originalID, offsetPos, remoteClient, surfaceArgs); | ||
631 | } | ||
632 | } | ||
633 | |||
629 | public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) | 634 | public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs) |
630 | { | 635 | { |
631 | handlerObjectDeGrab = OnObjectDeGrab; | 636 | handlerObjectDeGrab = OnObjectDeGrab; |