From b24c669c16d574a30a856839dd5fcbf8c1d4eabe Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 2 Jan 2019 16:44:13 +0000 Subject: more on the hack (runprebuild) --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 26 +++++++++++++--------- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 4 +++- 2 files changed, 19 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 34e3a43..9a022e6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -26,15 +26,11 @@ */ using System; -using System.Collections; using System.Collections.Generic; using System.Net; using System.Reflection; using System.Runtime; -using System.Text; using System.Threading; -using System.Timers; -using System.Xml; using log4net; using OpenMetaverse; @@ -48,11 +44,10 @@ using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; -using Timer = System.Timers.Timer; +using Caps = OpenSim.Framework.Capabilities.Caps; + using AssetLandmark = OpenSim.Framework.AssetLandmark; using RegionFlags = OpenMetaverse.RegionFlags; - -using System.IO; using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.ClientStack.LindenUDP @@ -351,7 +346,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #pragma warning restore 0414 private const uint MaxTransferBytesPerPacket = 600; - public bool SupportObjectAnimations { get; set; } + private bool m_SupportObjectAnimations; /// /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the @@ -3917,7 +3912,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId) { // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name); - if(!SupportObjectAnimations) + if(!m_SupportObjectAnimations) return; ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); @@ -4330,7 +4325,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (update.Entity is SceneObjectPart) { - if (SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) + if (m_SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) { SceneObjectPart sop = (SceneObjectPart)update.Entity; if ( sop.Animations != null) @@ -13540,5 +13535,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP { return new HashSet(m_inPacketsToDrop); } + + public void CheckViewerCaps() + { + m_SupportObjectAnimations = false; + if (m_scene.CapsModule != null) + { + Caps cap = m_scene.CapsModule.GetCapsForUser(CircuitCode); + if (cap != null && (cap.Flags & Caps.CapsFlags.ObjectAnim) != 0) + m_SupportObjectAnimations = true; + } + } } } diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 667acf9..5f35782 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -46,6 +46,7 @@ using OpenMetaverse; using Mono.Addins; using TokenBucket = OpenSim.Region.ClientStack.LindenUDP.TokenBucket; + namespace OpenSim.Region.ClientStack.LindenUDP { /// @@ -1697,8 +1698,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_pendingCache.Remove(endPoint); } - m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); + client.CheckViewerCaps(); + m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); // Reinject queued packets while (queue.Count > 0) { -- cgit v1.1