aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs51
1 files changed, 33 insertions, 18 deletions
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
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 SceneObjectPart part = GetSceneObjectPart(primLocalID); 169 List<SceneObjectPart> needUpdates = new List<SceneObjectPart>();
170 170
171 if (null == part) 171 foreach(uint primLocalID in primIDs)
172 return; 172 {
173 SceneObjectPart part = GetSceneObjectPart(primLocalID);
173 174
174 SceneObjectGroup sog = part.ParentGroup; 175 if (part == null)
175 if (sog == null) 176 continue;
176 return; 177
178 SceneObjectGroup sog = part.ParentGroup;
179 if (sog == null)
180 continue;
181
182 needUpdates.Add(part);
177 183
178 part.SendPropertiesToClient(remoteClient); 184 // waste of time because properties do not send prim flags as they should
179 remoteClient.SendPartPhysicsProprieties(part); 185 // if a friend got or lost edit rights after login, a full update is needed
186 if(sog.OwnerID != remoteClient.AgentId)
187 part.SendFullUpdate(remoteClient);
180 188
181 // waste of time because properties do not send prim flags as they should 189 // A prim is only tainted if it's allowed to be edited by the person clicking it.
182 // if a friend got or lost edit rights after login, a full update is needed 190 if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
183 if(sog.OwnerID != remoteClient.AgentId) 191 || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
184 part.SendFullUpdate(remoteClient); 192 {
193 part.IsSelected = true;
194 EventManager.TriggerParcelPrimCountTainted();
195 }
196 }
185 197
186 // A prim is only tainted if it's allowed to be edited by the person clicking it. 198 if(needUpdates.Count > 0)
187 if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId)
188 || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId))
189 { 199 {
190 part.IsSelected = true; 200 // this will be replaced by single client function
191 EventManager.TriggerParcelPrimCountTainted(); 201 // that will send the UDP and Caps part
202 foreach(SceneObjectPart part in needUpdates)
203 {
204 part.SendPropertiesToClient(remoteClient);
205 remoteClient.SendPartPhysicsProprieties(part);
206 }
192 } 207 }
193 } 208 }
194 209