diff options
author | UbitUmarov | 2019-01-02 16:44:13 +0000 |
---|---|---|
committer | UbitUmarov | 2019-01-02 16:44:13 +0000 |
commit | b24c669c16d574a30a856839dd5fcbf8c1d4eabe (patch) | |
tree | 18ae9d8ecea72c9c20edf4fb7352a8b3b27aab95 /OpenSim/Region/ClientStack | |
parent | mantis 8438: work around null ref (diff) | |
download | opensim-SC-b24c669c16d574a30a856839dd5fcbf8c1d4eabe.zip opensim-SC-b24c669c16d574a30a856839dd5fcbf8c1d4eabe.tar.gz opensim-SC-b24c669c16d574a30a856839dd5fcbf8c1d4eabe.tar.bz2 opensim-SC-b24c669c16d574a30a856839dd5fcbf8c1d4eabe.tar.xz |
more on the hack (runprebuild)
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 26 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 4 |
2 files changed, 19 insertions, 11 deletions
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 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | ||
30 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
31 | using System.Net; | 30 | using System.Net; |
32 | using System.Reflection; | 31 | using System.Reflection; |
33 | using System.Runtime; | 32 | using System.Runtime; |
34 | using System.Text; | ||
35 | using System.Threading; | 33 | using System.Threading; |
36 | using System.Timers; | ||
37 | using System.Xml; | ||
38 | 34 | ||
39 | using log4net; | 35 | using log4net; |
40 | using OpenMetaverse; | 36 | using OpenMetaverse; |
@@ -48,11 +44,10 @@ using OpenSim.Framework.Monitoring; | |||
48 | using OpenSim.Region.Framework.Interfaces; | 44 | using OpenSim.Region.Framework.Interfaces; |
49 | using OpenSim.Region.Framework.Scenes; | 45 | using OpenSim.Region.Framework.Scenes; |
50 | using OpenSim.Services.Interfaces; | 46 | using OpenSim.Services.Interfaces; |
51 | using Timer = System.Timers.Timer; | 47 | using Caps = OpenSim.Framework.Capabilities.Caps; |
48 | |||
52 | using AssetLandmark = OpenSim.Framework.AssetLandmark; | 49 | using AssetLandmark = OpenSim.Framework.AssetLandmark; |
53 | using RegionFlags = OpenMetaverse.RegionFlags; | 50 | using RegionFlags = OpenMetaverse.RegionFlags; |
54 | |||
55 | using System.IO; | ||
56 | using PermissionMask = OpenSim.Framework.PermissionMask; | 51 | using PermissionMask = OpenSim.Framework.PermissionMask; |
57 | 52 | ||
58 | namespace OpenSim.Region.ClientStack.LindenUDP | 53 | namespace OpenSim.Region.ClientStack.LindenUDP |
@@ -351,7 +346,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
351 | #pragma warning restore 0414 | 346 | #pragma warning restore 0414 |
352 | private const uint MaxTransferBytesPerPacket = 600; | 347 | private const uint MaxTransferBytesPerPacket = 600; |
353 | 348 | ||
354 | public bool SupportObjectAnimations { get; set; } | 349 | private bool m_SupportObjectAnimations; |
355 | 350 | ||
356 | /// <value> | 351 | /// <value> |
357 | /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the | 352 | /// 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 | |||
3917 | public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId) | 3912 | public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId) |
3918 | { | 3913 | { |
3919 | // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name); | 3914 | // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name); |
3920 | if(!SupportObjectAnimations) | 3915 | if(!m_SupportObjectAnimations) |
3921 | return; | 3916 | return; |
3922 | 3917 | ||
3923 | ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); | 3918 | ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); |
@@ -4330,7 +4325,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4330 | 4325 | ||
4331 | if (update.Entity is SceneObjectPart) | 4326 | if (update.Entity is SceneObjectPart) |
4332 | { | 4327 | { |
4333 | if (SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) | 4328 | if (m_SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) |
4334 | { | 4329 | { |
4335 | SceneObjectPart sop = (SceneObjectPart)update.Entity; | 4330 | SceneObjectPart sop = (SceneObjectPart)update.Entity; |
4336 | if ( sop.Animations != null) | 4331 | if ( sop.Animations != null) |
@@ -13540,5 +13535,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13540 | { | 13535 | { |
13541 | return new HashSet<string>(m_inPacketsToDrop); | 13536 | return new HashSet<string>(m_inPacketsToDrop); |
13542 | } | 13537 | } |
13538 | |||
13539 | public void CheckViewerCaps() | ||
13540 | { | ||
13541 | m_SupportObjectAnimations = false; | ||
13542 | if (m_scene.CapsModule != null) | ||
13543 | { | ||
13544 | Caps cap = m_scene.CapsModule.GetCapsForUser(CircuitCode); | ||
13545 | if (cap != null && (cap.Flags & Caps.CapsFlags.ObjectAnim) != 0) | ||
13546 | m_SupportObjectAnimations = true; | ||
13547 | } | ||
13548 | } | ||
13543 | } | 13549 | } |
13544 | } | 13550 | } |
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; | |||
46 | using Mono.Addins; | 46 | using Mono.Addins; |
47 | using TokenBucket = OpenSim.Region.ClientStack.LindenUDP.TokenBucket; | 47 | using TokenBucket = OpenSim.Region.ClientStack.LindenUDP.TokenBucket; |
48 | 48 | ||
49 | |||
49 | namespace OpenSim.Region.ClientStack.LindenUDP | 50 | namespace OpenSim.Region.ClientStack.LindenUDP |
50 | { | 51 | { |
51 | /// <summary> | 52 | /// <summary> |
@@ -1697,8 +1698,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1697 | m_pendingCache.Remove(endPoint); | 1698 | m_pendingCache.Remove(endPoint); |
1698 | } | 1699 | } |
1699 | 1700 | ||
1700 | m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); | 1701 | client.CheckViewerCaps(); |
1701 | 1702 | ||
1703 | m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); | ||
1702 | // Reinject queued packets | 1704 | // Reinject queued packets |
1703 | while (queue.Count > 0) | 1705 | while (queue.Count > 0) |
1704 | { | 1706 | { |