aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-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
4 files changed, 53 insertions, 11 deletions
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 }