aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs85
1 files changed, 41 insertions, 44 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index c49edd1..4d491d1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -164,55 +164,39 @@ namespace OpenSim.Region.Framework.Scenes
164 /// </summary> 164 /// </summary>
165 /// <param name="primLocalID"></param> 165 /// <param name="primLocalID"></param>
166 /// <param name="remoteClient"></param> 166 /// <param name="remoteClient"></param>
167 public void SelectPrim(uint primLocalID, IClientAPI remoteClient) 167 public void SelectPrim(List<uint> primIDs, IClientAPI remoteClient)
168 { 168 {
169 /* 169 List<ISceneEntity> needUpdates = new List<ISceneEntity>();
170 SceneObjectPart part = GetSceneObjectPart(primLocalID);
171 170
172 if (null == part) 171 foreach(uint primLocalID in primIDs)
173 return; 172 {
174 173 SceneObjectPart part = GetSceneObjectPart(primLocalID);
175 if (part.IsRoot)
176 {
177 SceneObjectGroup sog = part.ParentGroup;
178 sog.SendPropertiesToClient(remoteClient);
179
180 // A prim is only tainted if it's allowed to be edited by the person clicking it.
181 if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
182 || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
183 {
184 sog.IsSelected = true;
185 EventManager.TriggerParcelPrimCountTainted();
186 }
187 }
188 else
189 {
190 part.SendPropertiesToClient(remoteClient);
191 }
192 */
193 SceneObjectPart part = GetSceneObjectPart(primLocalID);
194 174
195 if (null == part) 175 if (part == null)
196 return; 176 continue;
197 177
198 SceneObjectGroup sog = part.ParentGroup; 178 SceneObjectGroup sog = part.ParentGroup;
199 if (sog == null) 179 if (sog == null)
200 return; 180 continue;
201 181
202 part.SendPropertiesToClient(remoteClient); 182 needUpdates.Add((ISceneEntity)part);
203 183
204 // waste of time because properties do not send prim flags as they should 184 // waste of time because properties do not send prim flags as they should
205 // if a friend got or lost edit rights after login, a full update is needed 185 // if a friend got or lost edit rights after login, a full update is needed
206 if(sog.OwnerID != remoteClient.AgentId) 186 if(sog.OwnerID != remoteClient.AgentId)
207 part.SendFullUpdate(remoteClient); 187 part.SendFullUpdate(remoteClient);
208 188
209 // A prim is only tainted if it's allowed to be edited by the person clicking it. 189 // A prim is only tainted if it's allowed to be edited by the person clicking it.
210 if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId) 190 if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
211 || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId)) 191 || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
212 { 192 {
213 part.IsSelected = true; 193 part.IsSelected = true;
214 EventManager.TriggerParcelPrimCountTainted(); 194 EventManager.TriggerParcelPrimCountTainted();
195 }
215 } 196 }
197
198 if(needUpdates.Count > 0)
199 remoteClient.SendSelectedPartsProprieties(needUpdates);
216 } 200 }
217 201
218 /// <summary> 202 /// <summary>
@@ -377,8 +361,21 @@ namespace OpenSim.Region.Framework.Scenes
377 if (part == null) 361 if (part == null)
378 return; 362 return;
379 363
380 SceneObjectGroup obj = part.ParentGroup; 364 SceneObjectGroup group = part.ParentGroup;
365 if(group == null || group.IsDeleted)
366 return;
367
368 if (Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.)
369 {
370 group.GrabMovement(objectID, offset, pos, remoteClient);
371 }
381 372
373 // This is outside the above permissions condition
374 // so that if the object is locked the client moving the object
375 // get's it's position on the simulator even if it was the same as before
376 // This keeps the moving user's client in sync with the rest of the world.
377 group.SendGroupTerseUpdate();
378
382 SurfaceTouchEventArgs surfaceArg = null; 379 SurfaceTouchEventArgs surfaceArg = null;
383 if (surfaceArgs != null && surfaceArgs.Count > 0) 380 if (surfaceArgs != null && surfaceArgs.Count > 0)
384 surfaceArg = surfaceArgs[0]; 381 surfaceArg = surfaceArgs[0];
@@ -391,9 +388,9 @@ namespace OpenSim.Region.Framework.Scenes
391 // or if we're meant to pass on touches anyway. Don't send to root prim 388 // or if we're meant to pass on touches anyway. Don't send to root prim
392 // if prim touched is the root prim as we just did it 389 // if prim touched is the root prim as we just did it
393 if (((part.ScriptEvents & scriptEvents.touch) == 0) || 390 if (((part.ScriptEvents & scriptEvents.touch) == 0) ||
394 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId))) 391 (part.PassTouches && (part.LocalId != group.RootPart.LocalId)))
395 { 392 {
396 EventManager.TriggerObjectGrabbing(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); 393 EventManager.TriggerObjectGrabbing(group.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
397 } 394 }
398 } 395 }
399 396