From 991dd5f4712f7f6b61b4953f3f388f85992db67b Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Thu, 25 Aug 2016 06:56:13 +0100
Subject: first step changing Object Select code
---
.../Framework/Scenes/Scene.PacketHandlers.cs | 51 ++++++++++++++--------
1 file changed, 33 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 1aa8087..f8996d0 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -164,31 +164,46 @@ namespace OpenSim.Region.Framework.Scenes
///
///
///
- public void SelectPrim(uint primLocalID, IClientAPI remoteClient)
+ public void SelectPrim(List primIDs, IClientAPI remoteClient)
{
- SceneObjectPart part = GetSceneObjectPart(primLocalID);
+ List needUpdates = new List();
- if (null == part)
- return;
+ foreach(uint primLocalID in primIDs)
+ {
+ SceneObjectPart part = GetSceneObjectPart(primLocalID);
- SceneObjectGroup sog = part.ParentGroup;
- if (sog == null)
- return;
+ if (part == null)
+ continue;
+
+ SceneObjectGroup sog = part.ParentGroup;
+ if (sog == null)
+ continue;
+
+ needUpdates.Add(part);
- part.SendPropertiesToClient(remoteClient);
- remoteClient.SendPartPhysicsProprieties(part);
+ // waste of time because properties do not send prim flags as they should
+ // if a friend got or lost edit rights after login, a full update is needed
+ if(sog.OwnerID != remoteClient.AgentId)
+ part.SendFullUpdate(remoteClient);
- // waste of time because properties do not send prim flags as they should
- // if a friend got or lost edit rights after login, a full update is needed
- if(sog.OwnerID != remoteClient.AgentId)
- part.SendFullUpdate(remoteClient);
+ // A prim is only tainted if it's allowed to be edited by the person clicking it.
+ if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
+ || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
+ {
+ part.IsSelected = true;
+ EventManager.TriggerParcelPrimCountTainted();
+ }
+ }
- // A prim is only tainted if it's allowed to be edited by the person clicking it.
- if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
- || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
+ if(needUpdates.Count > 0)
{
- part.IsSelected = true;
- EventManager.TriggerParcelPrimCountTainted();
+ // this will be replaced by single client function
+ // that will send the UDP and Caps part
+ foreach(SceneObjectPart part in needUpdates)
+ {
+ part.SendPropertiesToClient(remoteClient);
+ remoteClient.SendPartPhysicsProprieties(part);
+ }
}
}
--
cgit v1.1