aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs42
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs14
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs4
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs4
6 files changed, 59 insertions, 11 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 6f2f834..cafbd1f 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -1382,6 +1382,8 @@ namespace OpenSim.Framework
1382 1382
1383 void SendObjectPropertiesReply(ISceneEntity Entity); 1383 void SendObjectPropertiesReply(ISceneEntity Entity);
1384 1384
1385 void SendSelectedPartsProprieties(List<ISceneEntity> parts);
1386
1385 void SendPartPhysicsProprieties(ISceneEntity Entity); 1387 void SendPartPhysicsProprieties(ISceneEntity Entity);
1386 1388
1387 void SendAgentOffline(UUID[] agentIDs); 1389 void SendAgentOffline(UUID[] agentIDs);
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 47869bd..fad250b 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -2801,6 +2801,48 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2801 SendAgentGroupDataUpdate(AgentId,GroupMembership); 2801 SendAgentGroupDataUpdate(AgentId,GroupMembership);
2802 } 2802 }
2803 2803
2804 public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
2805 {
2806 // udp part
2807 ObjectPropertiesPacket packet =
2808 (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
2809 ObjectPropertiesPacket.ObjectDataBlock[] ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[parts.Count];
2810
2811 int i = 0;
2812 foreach(SceneObjectPart sop in parts)
2813 ObjectData[i++] = CreateObjectPropertiesBlock(sop);
2814
2815 packet.ObjectData = ObjectData;
2816 packet.Header.Zerocoded = true;
2817 // udp send splits this mega packets correctly
2818 // mb later will avoid that to reduce gc stress
2819 OutPacket(packet, ThrottleOutPacketType.Task, true);
2820
2821 // caps physics part
2822 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
2823 if(eq == null)
2824 return;
2825
2826 OSDArray array = new OSDArray();
2827 foreach(SceneObjectPart sop in parts)
2828 {
2829 OSDMap physinfo = new OSDMap(6);
2830 physinfo["LocalID"] = sop.LocalId;
2831 physinfo["Density"] = sop.Density;
2832 physinfo["Friction"] = sop.Friction;
2833 physinfo["GravityMultiplier"] = sop.GravityModifier;
2834 physinfo["Restitution"] = sop.Restitution;
2835 physinfo["PhysicsShapeType"] = (int)sop.PhysicsShapeType;
2836 array.Add(physinfo);
2837 }
2838
2839 OSDMap llsdBody = new OSDMap(1);
2840 llsdBody.Add("ObjectData", array);
2841
2842 eq.Enqueue(BuildEvent("ObjectPhysicsProperties", llsdBody),AgentId);
2843 }
2844
2845
2804 public void SendPartPhysicsProprieties(ISceneEntity entity) 2846 public void SendPartPhysicsProprieties(ISceneEntity entity)
2805 { 2847 {
2806 SceneObjectPart part = (SceneObjectPart)entity; 2848 SceneObjectPart part = (SceneObjectPart)entity;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index f8996d0..4d491d1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -166,7 +166,7 @@ namespace OpenSim.Region.Framework.Scenes
166 /// <param name="remoteClient"></param> 166 /// <param name="remoteClient"></param>
167 public void SelectPrim(List<uint> primIDs, IClientAPI remoteClient) 167 public void SelectPrim(List<uint> primIDs, IClientAPI remoteClient)
168 { 168 {
169 List<SceneObjectPart> needUpdates = new List<SceneObjectPart>(); 169 List<ISceneEntity> needUpdates = new List<ISceneEntity>();
170 170
171 foreach(uint primLocalID in primIDs) 171 foreach(uint primLocalID in primIDs)
172 { 172 {
@@ -179,7 +179,7 @@ namespace OpenSim.Region.Framework.Scenes
179 if (sog == null) 179 if (sog == null)
180 continue; 180 continue;
181 181
182 needUpdates.Add(part); 182 needUpdates.Add((ISceneEntity)part);
183 183
184 // 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
185 // 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
@@ -196,15 +196,7 @@ namespace OpenSim.Region.Framework.Scenes
196 } 196 }
197 197
198 if(needUpdates.Count > 0) 198 if(needUpdates.Count > 0)
199 { 199 remoteClient.SendSelectedPartsProprieties(needUpdates);
200 // this will be replaced by single client function
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 }
207 }
208 } 200 }
209 201
210 /// <summary> 202 /// <summary>
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index e21d69f..427b48e 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1753,6 +1753,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1753 { 1753 {
1754 } 1754 }
1755 1755
1756 public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
1757 {
1758 }
1759
1756 public void SendPartPhysicsProprieties(ISceneEntity entity) 1760 public void SendPartPhysicsProprieties(ISceneEntity entity)
1757 { 1761 {
1758 } 1762 }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 52e8660..07413cf 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -1337,6 +1337,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC
1337 { 1337 {
1338 } 1338 }
1339 1339
1340 public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
1341 {
1342 }
1343
1340 public void SendPartPhysicsProprieties(ISceneEntity entity) 1344 public void SendPartPhysicsProprieties(ISceneEntity entity)
1341 { 1345 {
1342 } 1346 }
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index 9b087c9..6a697f2 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -1384,6 +1384,10 @@ namespace OpenSim.Tests.Common
1384 { 1384 {
1385 } 1385 }
1386 1386
1387 public void SendSelectedPartsProprieties(List<ISceneEntity> parts)
1388 {
1389 }
1390
1387 public void SendPartPhysicsProprieties(ISceneEntity entity) 1391 public void SendPartPhysicsProprieties(ISceneEntity entity)
1388 { 1392 {
1389 } 1393 }