diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLPacketTracker.cs | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketTracker.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketTracker.cs index e775a67..ce9c527 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketTracker.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketTracker.cs | |||
@@ -3,6 +3,8 @@ using System.Collections.Generic; | |||
3 | using System.Text; | 3 | using System.Text; |
4 | using System.Threading; | 4 | using System.Threading; |
5 | using libsecondlife; | 5 | using libsecondlife; |
6 | using libsecondlife.Packets; | ||
7 | using OpenSim.Framework; | ||
6 | 8 | ||
7 | namespace OpenSim.Region.ClientStack.LindenUDP | 9 | namespace OpenSim.Region.ClientStack.LindenUDP |
8 | { | 10 | { |
@@ -36,11 +38,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
36 | 38 | ||
37 | public void TrackTerrainPacket(uint sequenceNumber, int patchX, int patchY) | 39 | public void TrackTerrainPacket(uint sequenceNumber, int patchX, int patchY) |
38 | { | 40 | { |
41 | TrackTerrainPacket(sequenceNumber, patchX, patchY, false, null); | ||
42 | } | ||
43 | |||
44 | public void TrackTerrainPacket(uint sequenceNumber, int patchX, int patchY, bool keepResending, LayerDataPacket packet) | ||
45 | { | ||
39 | TerrainPacketTracker tracker = new TerrainPacketTracker(); | 46 | TerrainPacketTracker tracker = new TerrainPacketTracker(); |
40 | tracker.X = patchX; | 47 | tracker.X = patchX; |
41 | tracker.Y = patchY; | 48 | tracker.Y = patchY; |
42 | tracker.SeqNumber = sequenceNumber; | 49 | tracker.SeqNumber = sequenceNumber; |
43 | tracker.TimeSent = DateTime.Now; | 50 | tracker.TimeSent = DateTime.Now; |
51 | tracker.KeepResending = keepResending; | ||
52 | tracker.Packet = packet; | ||
44 | lock (m_sentTerrainPackets) | 53 | lock (m_sentTerrainPackets) |
45 | { | 54 | { |
46 | m_sentTerrainPackets[patchX, patchY] = tracker; | 55 | m_sentTerrainPackets[patchX, patchY] = tracker; |
@@ -85,7 +94,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
85 | 94 | ||
86 | foreach (TerrainPacketTracker tracker in resendList) | 95 | foreach (TerrainPacketTracker tracker in resendList) |
87 | { | 96 | { |
88 | m_parentClient.TriggerTerrainUnackedEvent(tracker.X, tracker.Y); | 97 | if (!tracker.KeepResending) |
98 | { | ||
99 | m_parentClient.TriggerTerrainUnackedEvent(tracker.X, tracker.Y); | ||
100 | } | ||
101 | else | ||
102 | { | ||
103 | if (tracker.Packet != null) | ||
104 | { | ||
105 | tracker.Packet.Header.Resent = true; | ||
106 | m_parentClient.OutPacket(tracker.Packet, ThrottleOutPacketType.Resend); | ||
107 | tracker.TimeSent = DateTime.Now; | ||
108 | lock (m_sentTerrainPackets) | ||
109 | { | ||
110 | if (m_sentTerrainPackets[tracker.X, tracker.Y] == null) | ||
111 | { | ||
112 | m_sentTerrainPackets[tracker.X, tracker.Y] = tracker; | ||
113 | } | ||
114 | } | ||
115 | } | ||
116 | } | ||
89 | } | 117 | } |
90 | } | 118 | } |
91 | 119 | ||
@@ -220,7 +248,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
220 | public int X; | 248 | public int X; |
221 | public int Y; | 249 | public int Y; |
222 | public DateTime TimeSent; | 250 | public DateTime TimeSent; |
223 | 251 | public LayerDataPacket Packet; | |
252 | public bool KeepResending; | ||
224 | } | 253 | } |
225 | 254 | ||
226 | public class PrimPacketTracker | 255 | public class PrimPacketTracker |