diff options
author | UbitUmarov | 2015-08-22 04:08:30 +0100 |
---|---|---|
committer | UbitUmarov | 2015-08-22 04:08:30 +0100 |
commit | e3d82ad706db04d295a549543380b71b00848f7f (patch) | |
tree | 5f03bf129f1bb1ce4c2189b72e383824d9e8204d /OpenSim/Region/ClientStack | |
parent | "uglyfy" GetModifiedPatchesInViewDistance. Also make it use camera or (diff) | |
download | opensim-SC_OLD-e3d82ad706db04d295a549543380b71b00848f7f.zip opensim-SC_OLD-e3d82ad706db04d295a549543380b71b00848f7f.tar.gz opensim-SC_OLD-e3d82ad706db04d295a549543380b71b00848f7f.tar.bz2 opensim-SC_OLD-e3d82ad706db04d295a549543380b71b00848f7f.tar.xz |
delay terrain sending if land queue is 2 busy
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 11 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | 14 |
2 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 36c3780..46836b1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -1199,6 +1199,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1199 | OutPacket(GATRP, ThrottleOutPacketType.Task); | 1199 | OutPacket(GATRP, ThrottleOutPacketType.Task); |
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | |||
1203 | public virtual bool CanSendLayerData() | ||
1204 | { | ||
1205 | int n = m_udpClient.GetCatBytesInSendQueue(ThrottleOutPacketType.Land); | ||
1206 | if ( n > 100000) | ||
1207 | return false; | ||
1208 | return true; | ||
1209 | } | ||
1210 | |||
1202 | /// <summary> | 1211 | /// <summary> |
1203 | /// Send the region heightmap to the client | 1212 | /// Send the region heightmap to the client |
1204 | /// This method is only called when not doing intellegent terrain patch sending and | 1213 | /// This method is only called when not doing intellegent terrain patch sending and |
@@ -9151,7 +9160,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9151 | if ((locX >= m_scene.RegionInfo.WorldLocX) | 9160 | if ((locX >= m_scene.RegionInfo.WorldLocX) |
9152 | && (locX < (m_scene.RegionInfo.WorldLocX + m_scene.RegionInfo.RegionSizeX)) | 9161 | && (locX < (m_scene.RegionInfo.WorldLocX + m_scene.RegionInfo.RegionSizeX)) |
9153 | && (locY >= m_scene.RegionInfo.WorldLocY) | 9162 | && (locY >= m_scene.RegionInfo.WorldLocY) |
9154 | && (locY < (m_scene.RegionInfo.WorldLocY + m_scene.RegionInfo.RegionSizeY)) ) | 9163 | && (locY < (m_scene.RegionInfo.WorldLocY + m_scene.RegionInfo.RegionSizeY))) |
9155 | { | 9164 | { |
9156 | tpLocReq.Info.RegionHandle = m_scene.RegionInfo.RegionHandle; | 9165 | tpLocReq.Info.RegionHandle = m_scene.RegionInfo.RegionHandle; |
9157 | tpLocReq.Info.Position.X += locX - m_scene.RegionInfo.WorldLocX; | 9166 | tpLocReq.Info.Position.X += locX - m_scene.RegionInfo.WorldLocX; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index 0ae7617..4b541e6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -474,6 +474,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
474 | 474 | ||
475 | return data; | 475 | return data; |
476 | } | 476 | } |
477 | |||
478 | public int GetCatBytesInSendQueue(ThrottleOutPacketType cat) | ||
479 | { | ||
480 | ; | ||
481 | int icat = (int)cat; | ||
482 | if (icat > 0 && icat < THROTTLE_CATEGORY_COUNT) | ||
483 | { | ||
484 | TokenBucket bucket = m_throttleCategories[icat]; | ||
485 | return m_packetOutboxes[icat].Count; | ||
486 | } | ||
487 | else | ||
488 | return 0; | ||
489 | } | ||
490 | |||
477 | 491 | ||
478 | public int GetCatBytesCanSend(ThrottleOutPacketType cat, int timeMS) | 492 | public int GetCatBytesCanSend(ThrottleOutPacketType cat, int timeMS) |
479 | { | 493 | { |