aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-07-03 23:04:12 +0000
committerJustin Clarke Casey2008-07-03 23:04:12 +0000
commit8251508412940b3f584f051a860a1bb4ddbfb62e (patch)
tree8a5e460836a8fe6c945e5a3ac4e54445a6d9cfe4 /OpenSim/Region/ClientStack/LindenUDP
parentMantis#1661. Thank you kindly, CMickeyb for a patch that: (diff)
downloadopensim-SC_OLD-8251508412940b3f584f051a860a1bb4ddbfb62e.zip
opensim-SC_OLD-8251508412940b3f584f051a860a1bb4ddbfb62e.tar.gz
opensim-SC_OLD-8251508412940b3f584f051a860a1bb4ddbfb62e.tar.bz2
opensim-SC_OLD-8251508412940b3f584f051a860a1bb4ddbfb62e.tar.xz
* On client login, send only one terrain patch at a time (with pauses) instead of 4 at a time
* Certain terrains which are fine went patches are sent singly cause a libsecondlife failure when patches are sent in batches * See http://opensimulator.org/mantis/view.php?id=1662 for more details
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs34
1 files changed, 25 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index cd3efe3..949aa27 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1101,27 +1101,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1101 //} 1101 //}
1102 } 1102 }
1103 1103
1104 /// <summary>
1105 /// Send terrain layer information to the client.
1106 /// </summary>
1107 /// <param name="o"></param>
1104 private void DoSendLayerData(object o) 1108 private void DoSendLayerData(object o)
1105 { 1109 {
1106 float[] map = (float[])o; 1110 float[] map = (float[])o;
1111
1107 try 1112 try
1108 { 1113 {
1109 for (int y = 0; y < 16; y++) 1114 for (int y = 0; y < 16; y++)
1110 { 1115 {
1111 for (int x = 0; x < 16; x += 4) 1116 // For some terrains, sending more than one terrain patch at once results in a libsecondlife exception
1117 // see http://opensimulator.org/mantis/view.php?id=1662
1118 //for (int x = 0; x < 16; x += 4)
1119 //{
1120 // SendLayerPacket(map, y, x);
1121 // Thread.Sleep(150);
1122 //}
1123 for (int x= 0; x < 16; x++)
1112 { 1124 {
1113 SendLayerPacket(map, y, x); 1125 SendLayerData(x, y, map);
1114 Thread.Sleep(150); 1126 Thread.Sleep(35);
1115 } 1127 }
1116 } 1128 }
1117 } 1129 }
1118 catch (Exception e) 1130 catch (Exception e)
1119 { 1131 {
1120 m_log.Warn("[client]: " + 1132 m_log.Warn("[CLIENT]: ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
1121 "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
1122 } 1133 }
1123 } 1134 }
1124 1135
1136 /// <summary>
1137 /// Sends a set of four patches (x, x+1, ..., x+3) to the client
1138 /// </summary>
1139 /// <param name="map">heightmap</param>
1140 /// <param name="px">X coordinate for patches 0..12</param>
1141 /// <param name="py">Y coordinate for patches 0..15</param>
1125 private void SendLayerPacket(float[] map, int y, int x) 1142 private void SendLayerPacket(float[] map, int y, int x)
1126 { 1143 {
1127 int[] patches = new int[4]; 1144 int[] patches = new int[4];
@@ -1137,8 +1154,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1137 /// <summary> 1154 /// <summary>
1138 /// Sends a specified patch to a client 1155 /// Sends a specified patch to a client
1139 /// </summary> 1156 /// </summary>
1140 /// <param name="px">Patch coordinate (x) 0..16</param> 1157 /// <param name="px">Patch coordinate (x) 0..15</param>
1141 /// <param name="py">Patch coordinate (y) 0..16</param> 1158 /// <param name="py">Patch coordinate (y) 0..15</param>
1142 /// <param name="map">heightmap</param> 1159 /// <param name="map">heightmap</param>
1143 public void SendLayerData(int px, int py, float[] map) 1160 public void SendLayerData(int px, int py, float[] map)
1144 { 1161 {
@@ -1157,8 +1174,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1157 } 1174 }
1158 catch (Exception e) 1175 catch (Exception e)
1159 { 1176 {
1160 m_log.Warn("[client]: " + 1177 m_log.Warn("[client]: ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
1161 "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString());
1162 } 1178 }
1163 } 1179 }
1164 1180