diff options
author | UbitUmarov | 2016-08-25 09:51:34 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-25 09:51:34 +0100 |
commit | d5f376a4b10ffdb5acc17d4e350a0a523ba0e9f5 (patch) | |
tree | b609e2426f3238a1eef0c61e06596e3fad5e5c86 /OpenSim/Region/ClientStack/Linden | |
parent | suspend the use of SelectedObjects list. It is not threadSafe and is not in ... (diff) | |
download | opensim-SC-d5f376a4b10ffdb5acc17d4e350a0a523ba0e9f5.zip opensim-SC-d5f376a4b10ffdb5acc17d4e350a0a523ba0e9f5.tar.gz opensim-SC-d5f376a4b10ffdb5acc17d4e350a0a523ba0e9f5.tar.bz2 opensim-SC-d5f376a4b10ffdb5acc17d4e350a0a523ba0e9f5.tar.xz |
send selected objects Proprieties udp part outside update queues and as a physics single caps message per selection request
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 42 |
1 files changed, 42 insertions, 0 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; |