diff options
author | UbitUmarov | 2016-11-10 17:56:51 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-10 17:56:51 +0000 |
commit | bddaef51220198c3a3894edeece750e29337a558 (patch) | |
tree | 88c826e7b58aa966caa045386583699976c85afe /OpenSim/Region/ClientStack/Linden | |
parent | fix some invalid string.format arguments (diff) | |
download | opensim-SC_OLD-bddaef51220198c3a3894edeece750e29337a558.zip opensim-SC_OLD-bddaef51220198c3a3894edeece750e29337a558.tar.gz opensim-SC_OLD-bddaef51220198c3a3894edeece750e29337a558.tar.bz2 opensim-SC_OLD-bddaef51220198c3a3894edeece750e29337a558.tar.xz |
on Select use again the priority queues to send ObjectProperties, including physics via caps. This is need to reduce useless redudance
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 276b367..99c9049 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -2856,6 +2856,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2856 | 2856 | ||
2857 | public void SendSelectedPartsProprieties(List<ISceneEntity> parts) | 2857 | public void SendSelectedPartsProprieties(List<ISceneEntity> parts) |
2858 | { | 2858 | { |
2859 | /* not in use | ||
2859 | // udp part | 2860 | // udp part |
2860 | ObjectPropertiesPacket packet = | 2861 | ObjectPropertiesPacket packet = |
2861 | (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); | 2862 | (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); |
@@ -2893,6 +2894,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2893 | llsdBody.Add("ObjectData", array); | 2894 | llsdBody.Add("ObjectData", array); |
2894 | 2895 | ||
2895 | eq.Enqueue(BuildEvent("ObjectPhysicsProperties", llsdBody),AgentId); | 2896 | eq.Enqueue(BuildEvent("ObjectPhysicsProperties", llsdBody),AgentId); |
2897 | */ | ||
2896 | } | 2898 | } |
2897 | 2899 | ||
2898 | 2900 | ||
@@ -4839,7 +4841,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4839 | 4841 | ||
4840 | OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = | 4842 | OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates = |
4841 | new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); | 4843 | new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); |
4842 | 4844 | ||
4845 | List<SceneObjectPart> needPhysics = new List<SceneObjectPart>(); | ||
4846 | |||
4843 | EntityUpdate iupdate; | 4847 | EntityUpdate iupdate; |
4844 | Int32 timeinqueue; // this is just debugging code & can be dropped later | 4848 | Int32 timeinqueue; // this is just debugging code & can be dropped later |
4845 | 4849 | ||
@@ -4867,6 +4871,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4867 | if (update.Entity is SceneObjectPart) | 4871 | if (update.Entity is SceneObjectPart) |
4868 | { | 4872 | { |
4869 | SceneObjectPart sop = (SceneObjectPart)update.Entity; | 4873 | SceneObjectPart sop = (SceneObjectPart)update.Entity; |
4874 | needPhysics.Add(sop); | ||
4870 | ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop); | 4875 | ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop); |
4871 | objectPropertiesBlocks.Value.Add(objPropDB); | 4876 | objectPropertiesBlocks.Value.Add(objPropDB); |
4872 | propertyUpdates.Value.Add(update); | 4877 | propertyUpdates.Value.Add(update); |
@@ -4932,7 +4937,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4932 | // fpcnt++; | 4937 | // fpcnt++; |
4933 | // fbcnt++; | 4938 | // fbcnt++; |
4934 | } | 4939 | } |
4935 | 4940 | } | |
4941 | |||
4942 | if(needPhysics.Count > 0) | ||
4943 | { | ||
4944 | IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); | ||
4945 | if(eq != null) | ||
4946 | { | ||
4947 | OSDArray array = new OSDArray(); | ||
4948 | foreach(SceneObjectPart sop in needPhysics) | ||
4949 | { | ||
4950 | OSDMap physinfo = new OSDMap(6); | ||
4951 | physinfo["LocalID"] = sop.LocalId; | ||
4952 | physinfo["Density"] = sop.Density; | ||
4953 | physinfo["Friction"] = sop.Friction; | ||
4954 | physinfo["GravityMultiplier"] = sop.GravityModifier; | ||
4955 | physinfo["Restitution"] = sop.Restitution; | ||
4956 | physinfo["PhysicsShapeType"] = (int)sop.PhysicsShapeType; | ||
4957 | array.Add(physinfo); | ||
4958 | } | ||
4959 | |||
4960 | OSDMap llsdBody = new OSDMap(1); | ||
4961 | llsdBody.Add("ObjectData", array); | ||
4962 | |||
4963 | eq.Enqueue(BuildEvent("ObjectPhysicsProperties", llsdBody),AgentId); | ||
4964 | } | ||
4936 | } | 4965 | } |
4937 | 4966 | ||
4938 | // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt); | 4967 | // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt); |