diff options
author | Teravus Ovares | 2008-04-27 22:15:38 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-04-27 22:15:38 +0000 |
commit | 54563d8dea86ca1e022f3aafa791908e8bcc4912 (patch) | |
tree | 2eab339160a5f89cb637c6554e6d56be594d2180 /OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |
parent | * Single Attachments now work from inventory. You can attach from inventory ... (diff) | |
download | opensim-SC-54563d8dea86ca1e022f3aafa791908e8bcc4912.zip opensim-SC-54563d8dea86ca1e022f3aafa791908e8bcc4912.tar.gz opensim-SC-54563d8dea86ca1e022f3aafa791908e8bcc4912.tar.bz2 opensim-SC-54563d8dea86ca1e022f3aafa791908e8bcc4912.tar.xz |
* Patch from XenReborn to make remove-region work properly without needing to do a change-region first. Careful though. I still suggest you do a change-region first.
* Patch from Melanie to implement touch_end.
* Thanks XenReborn!. Thanks Melanie!
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 5e0b8ba..71b2716 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -151,22 +151,57 @@ namespace OpenSim.Region.Environment.Scenes | |||
151 | if (ent is SceneObjectGroup) | 151 | if (ent is SceneObjectGroup) |
152 | { | 152 | { |
153 | SceneObjectGroup obj = ent as SceneObjectGroup; | 153 | SceneObjectGroup obj = ent as SceneObjectGroup; |
154 | if (obj != null) | ||
155 | { | ||
156 | // Is this prim part of the group | ||
157 | if (obj.HasChildPrim(localID)) | ||
158 | { | ||
159 | // Currently only grab/touch for the single prim | ||
160 | // the client handles rez correctly | ||
161 | obj.ObjectGrabHandler(localID, offsetPos, remoteClient); | ||
162 | |||
163 | SceneObjectPart part = obj.GetChildPart(localID); | ||
164 | |||
165 | // If the touched prim handles touches, deliver it | ||
166 | // If not, deliver to root prim | ||
167 | if ((part.ObjectFlags & (uint)LLObject.ObjectFlags.Touch) != 0) | ||
168 | EventManager.TriggerObjectGrab(part.LocalId, part.OffsetPosition, remoteClient); | ||
169 | else | ||
170 | EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.OffsetPosition, remoteClient); | ||
171 | |||
172 | return; | ||
173 | } | ||
174 | } | ||
175 | } | ||
176 | } | ||
177 | } | ||
178 | |||
179 | public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient) | ||
180 | { | ||
181 | |||
182 | List<EntityBase> EntitieList = GetEntities(); | ||
183 | |||
184 | foreach (EntityBase ent in EntitieList) | ||
185 | { | ||
186 | if (ent is SceneObjectGroup) | ||
187 | { | ||
188 | SceneObjectGroup obj = ent as SceneObjectGroup; | ||
154 | 189 | ||
155 | // Is this prim part of the group | 190 | // Is this prim part of the group |
156 | if (obj.HasChildPrim(localID)) | 191 | if (obj.HasChildPrim(localID)) |
157 | { | 192 | { |
158 | // Currently only grab/touch for the single prim | 193 | SceneObjectPart part=obj.GetChildPart(localID); |
159 | // the client handles rez correctly | 194 | if (part != null) |
160 | obj.ObjectGrabHandler(localID, offsetPos, remoteClient); | ||
161 | |||
162 | // trigger event, one for each prim part in the group | ||
163 | // so that a touch to a non-root prim in a group will still | ||
164 | // trigger a touch_start for a script in the root prim | ||
165 | foreach (SceneObjectPart part in obj.Children.Values) | ||
166 | { | 195 | { |
167 | EventManager.TriggerObjectGrab(part.LocalId, part.OffsetPosition, remoteClient); | 196 | // If the touched prim handles touches, deliver it |
197 | // If not, deliver to root prim | ||
198 | if ((part.ObjectFlags & (uint)LLObject.ObjectFlags.Touch) != 0) | ||
199 | EventManager.TriggerObjectDeGrab(part.LocalId, remoteClient); | ||
200 | else | ||
201 | EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, remoteClient); | ||
202 | |||
203 | return; | ||
168 | } | 204 | } |
169 | |||
170 | return; | 205 | return; |
171 | } | 206 | } |
172 | } | 207 | } |