diff options
author | Melanie | 2010-02-03 00:16:02 +0000 |
---|---|---|
committer | Melanie | 2010-02-03 00:16:02 +0000 |
commit | 0f1a3f8ed2deee5a08415810235f9e11882e1652 (patch) | |
tree | 2e7382bc2b61ab1d9be4152da3ae46bf58167833 | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-0f1a3f8ed2deee5a08415810235f9e11882e1652.zip opensim-SC_OLD-0f1a3f8ed2deee5a08415810235f9e11882e1652.tar.gz opensim-SC_OLD-0f1a3f8ed2deee5a08415810235f9e11882e1652.tar.bz2 opensim-SC_OLD-0f1a3f8ed2deee5a08415810235f9e11882e1652.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IWorldComm.cs | 39 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 23 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 11 |
4 files changed, 60 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs index 74526c4..948b9dc 100644 --- a/OpenSim/Region/Framework/Interfaces/IWorldComm.cs +++ b/OpenSim/Region/Framework/Interfaces/IWorldComm.cs | |||
@@ -49,10 +49,49 @@ namespace OpenSim.Region.Framework.Interfaces | |||
49 | 49 | ||
50 | public interface IWorldComm | 50 | public interface IWorldComm |
51 | { | 51 | { |
52 | /// <summary> | ||
53 | /// Create a listen event callback with the specified filters. | ||
54 | /// The parameters localID,itemID are needed to uniquely identify | ||
55 | /// the script during 'peek' time. Parameter hostID is needed to | ||
56 | /// determine the position of the script. | ||
57 | /// </summary> | ||
58 | /// <param name="localID">localID of the script engine</param> | ||
59 | /// <param name="itemID">UUID of the script engine</param> | ||
60 | /// <param name="hostID">UUID of the SceneObjectPart</param> | ||
61 | /// <param name="channel">channel to listen on</param> | ||
62 | /// <param name="name">name to filter on</param> | ||
63 | /// <param name="id">key to filter on (user given, could be totally faked)</param> | ||
64 | /// <param name="msg">msg to filter on</param> | ||
65 | /// <returns>number of the scripts handle</returns> | ||
52 | int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg); | 66 | int Listen(uint LocalID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg); |
67 | |||
68 | /// <summary> | ||
69 | /// This method scans over the objects which registered an interest in listen callbacks. | ||
70 | /// For everyone it finds, it checks if it fits the given filter. If it does, then | ||
71 | /// enqueue the message for delivery to the objects listen event handler. | ||
72 | /// The enqueued ListenerInfo no longer has filter values, but the actually trigged values. | ||
73 | /// Objects that do an llSay have their messages delivered here and for nearby avatars, | ||
74 | /// the OnChatFromClient event is used. | ||
75 | /// </summary> | ||
76 | /// <param name="type">type of delvery (whisper,say,shout or regionwide)</param> | ||
77 | /// <param name="channel">channel to sent on</param> | ||
78 | /// <param name="name">name of sender (object or avatar)</param> | ||
79 | /// <param name="id">key of sender (object or avatar)</param> | ||
80 | /// <param name="msg">msg to sent</param> | ||
53 | void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg); | 81 | void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg); |
82 | |||
83 | /// <summary> | ||
84 | /// Are there any listen events ready to be dispatched? | ||
85 | /// </summary> | ||
86 | /// <returns>boolean indication</returns> | ||
54 | bool HasMessages(); | 87 | bool HasMessages(); |
88 | |||
89 | /// <summary> | ||
90 | /// Pop the first availlable listen event from the queue | ||
91 | /// </summary> | ||
92 | /// <returns>ListenerInfo with filter filled in</returns> | ||
55 | IWorldCommListenerInfo GetNextMessage(); | 93 | IWorldCommListenerInfo GetNextMessage(); |
94 | |||
56 | void ListenControl(UUID itemID, int handle, int active); | 95 | void ListenControl(UUID itemID, int handle, int active); |
57 | void ListenRemove(UUID itemID, int handle); | 96 | void ListenRemove(UUID itemID, int handle); |
58 | void DeleteListener(UUID itemID); | 97 | void DeleteListener(UUID itemID); |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 139fda0..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,7 +102,14 @@ 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 | |||
107 | public event ObjectGrabDelegate OnObjectGrabbing; | 113 | public event ObjectGrabDelegate OnObjectGrabbing; |
108 | public event ObjectDeGrabDelegate OnObjectDeGrab; | 114 | public event ObjectDeGrabDelegate OnObjectDeGrab; |
109 | public event ScriptResetDelegate OnScriptReset; | 115 | public event ScriptResetDelegate OnScriptReset; |
@@ -111,55 +117,42 @@ namespace OpenSim.Region.Framework.Scenes | |||
111 | public event OnPermissionErrorDelegate OnPermissionError; | 117 | public event OnPermissionErrorDelegate OnPermissionError; |
112 | 118 | ||
113 | 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); |
114 | |||
115 | public event NewRezScript OnRezScript; | 120 | public event NewRezScript OnRezScript; |
116 | 121 | ||
117 | public delegate void RemoveScript(uint localID, UUID itemID); | 122 | public delegate void RemoveScript(uint localID, UUID itemID); |
118 | |||
119 | public event RemoveScript OnRemoveScript; | 123 | public event RemoveScript OnRemoveScript; |
120 | 124 | ||
121 | public delegate void StartScript(uint localID, UUID itemID); | 125 | public delegate void StartScript(uint localID, UUID itemID); |
122 | |||
123 | public event StartScript OnStartScript; | 126 | public event StartScript OnStartScript; |
124 | 127 | ||
125 | public delegate void StopScript(uint localID, UUID itemID); | 128 | public delegate void StopScript(uint localID, UUID itemID); |
126 | |||
127 | public event StopScript OnStopScript; | 129 | public event StopScript OnStopScript; |
128 | 130 | ||
129 | public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); | 131 | public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); |
130 | |||
131 | public event SceneGroupMoved OnSceneGroupMove; | 132 | public event SceneGroupMoved OnSceneGroupMove; |
132 | 133 | ||
133 | public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID); | 134 | public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID); |
134 | |||
135 | public event SceneGroupGrabed OnSceneGroupGrab; | 135 | public event SceneGroupGrabed OnSceneGroupGrab; |
136 | 136 | ||
137 | public delegate bool SceneGroupSpinStarted(UUID groupID); | 137 | public delegate bool SceneGroupSpinStarted(UUID groupID); |
138 | |||
139 | public event SceneGroupSpinStarted OnSceneGroupSpinStart; | 138 | public event SceneGroupSpinStarted OnSceneGroupSpinStart; |
140 | 139 | ||
141 | public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation); | 140 | public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation); |
142 | |||
143 | public event SceneGroupSpun OnSceneGroupSpin; | 141 | public event SceneGroupSpun OnSceneGroupSpin; |
144 | 142 | ||
145 | public delegate void LandObjectAdded(ILandObject newParcel); | 143 | public delegate void LandObjectAdded(ILandObject newParcel); |
146 | |||
147 | public event LandObjectAdded OnLandObjectAdded; | 144 | public event LandObjectAdded OnLandObjectAdded; |
148 | 145 | ||
149 | public delegate void LandObjectRemoved(UUID globalID); | 146 | public delegate void LandObjectRemoved(UUID globalID); |
150 | |||
151 | public event LandObjectRemoved OnLandObjectRemoved; | 147 | public event LandObjectRemoved OnLandObjectRemoved; |
152 | 148 | ||
153 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); | 149 | public delegate void AvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID); |
154 | |||
155 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; | 150 | public event AvatarEnteringNewParcel OnAvatarEnteringNewParcel; |
156 | 151 | ||
157 | public delegate void SignificantClientMovement(IClientAPI remote_client); | 152 | public delegate void SignificantClientMovement(IClientAPI remote_client); |
158 | |||
159 | public event SignificantClientMovement OnSignificantClientMovement; | 153 | public event SignificantClientMovement OnSignificantClientMovement; |
160 | 154 | ||
161 | public delegate void IncomingInstantMessage(GridInstantMessage message); | 155 | public delegate void IncomingInstantMessage(GridInstantMessage message); |
162 | |||
163 | public event IncomingInstantMessage OnIncomingInstantMessage; | 156 | public event IncomingInstantMessage OnIncomingInstantMessage; |
164 | 157 | ||
165 | public event IncomingInstantMessage OnUnhandledInstantMessage; | 158 | public event IncomingInstantMessage OnUnhandledInstantMessage; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 768ceb5..9cb1398 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -301,6 +301,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
301 | set { m_rootPart.GroupID = value; } | 301 | set { m_rootPart.GroupID = value; } |
302 | } | 302 | } |
303 | 303 | ||
304 | /// <value> | ||
305 | /// The parts of this scene object group. You must lock this property before using it. | ||
306 | /// </value> | ||
304 | public Dictionary<UUID, SceneObjectPart> Children | 307 | public Dictionary<UUID, SceneObjectPart> Children |
305 | { | 308 | { |
306 | get { return m_parts; } | 309 | get { return m_parts; } |
@@ -2239,7 +2242,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2239 | } | 2242 | } |
2240 | 2243 | ||
2241 | /// <summary> | 2244 | /// <summary> |
2242 | /// Get a child part with a given UUID | 2245 | /// Get a part with a given UUID |
2243 | /// </summary> | 2246 | /// </summary> |
2244 | /// <param name="primID"></param> | 2247 | /// <param name="primID"></param> |
2245 | /// <returns>null if a child part with the primID was not found</returns> | 2248 | /// <returns>null if a child part with the primID was not found</returns> |
@@ -2254,7 +2257,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2254 | } | 2257 | } |
2255 | 2258 | ||
2256 | /// <summary> | 2259 | /// <summary> |
2257 | /// Get a child part with a given local ID | 2260 | /// Get a part with a given local ID |
2258 | /// </summary> | 2261 | /// </summary> |
2259 | /// <param name="localID"></param> | 2262 | /// <param name="localID"></param> |
2260 | /// <returns>null if a child part with the local ID was not found</returns> | 2263 | /// <returns>null if a child part with the local ID was not found</returns> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a99e6c7..fe1e218 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1930,7 +1930,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1930 | foreach (uint localId in startedColliders) | 1930 | foreach (uint localId in startedColliders) |
1931 | { | 1931 | { |
1932 | if (localId == 0) | 1932 | if (localId == 0) |
1933 | return; | 1933 | continue; |
1934 | // always running this check because if the user deletes the object it would return a null reference. | 1934 | // always running this check because if the user deletes the object it would return a null reference. |
1935 | if (m_parentGroup == null) | 1935 | if (m_parentGroup == null) |
1936 | return; | 1936 | return; |
@@ -2066,7 +2066,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2066 | { | 2066 | { |
2067 | // always running this check because if the user deletes the object it would return a null reference. | 2067 | // always running this check because if the user deletes the object it would return a null reference. |
2068 | if (localId == 0) | 2068 | if (localId == 0) |
2069 | return; | 2069 | continue; |
2070 | 2070 | ||
2071 | if (m_parentGroup == null) | 2071 | if (m_parentGroup == null) |
2072 | return; | 2072 | return; |
@@ -2198,7 +2198,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2198 | foreach (uint localId in endedColliders) | 2198 | foreach (uint localId in endedColliders) |
2199 | { | 2199 | { |
2200 | if (localId == 0) | 2200 | if (localId == 0) |
2201 | return; | 2201 | continue; |
2202 | 2202 | ||
2203 | // always running this check because if the user deletes the object it would return a null reference. | 2203 | // always running this check because if the user deletes the object it would return a null reference. |
2204 | if (m_parentGroup == null) | 2204 | if (m_parentGroup == null) |
@@ -3205,6 +3205,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3205 | } | 3205 | } |
3206 | } | 3206 | } |
3207 | 3207 | ||
3208 | /// <summary> | ||
3209 | /// Set the events that this part will pass on to listeners. | ||
3210 | /// </summary> | ||
3211 | /// <param name="scriptid"></param> | ||
3212 | /// <param name="events"></param> | ||
3208 | public void SetScriptEvents(UUID scriptid, int events) | 3213 | public void SetScriptEvents(UUID scriptid, int events) |
3209 | { | 3214 | { |
3210 | // scriptEvents oldparts; | 3215 | // scriptEvents oldparts; |