aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2019-01-20 20:58:27 +0000
committerUbitUmarov2019-01-20 20:58:27 +0000
commit0c38d52538a5d713e034fcec8da8df434e3ca924 (patch)
treeb54bb1749bae275e77bbfcaafb98833fd436748b /OpenSim/Region/CoreModules
parentcosmetics (diff)
downloadopensim-SC-0c38d52538a5d713e034fcec8da8df434e3ca924.zip
opensim-SC-0c38d52538a5d713e034fcec8da8df434e3ca924.tar.gz
opensim-SC-0c38d52538a5d713e034fcec8da8df434e3ca924.tar.bz2
opensim-SC-0c38d52538a5d713e034fcec8da8df434e3ca924.tar.xz
cosmetics on terrain patchs
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs21
1 files changed, 8 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index 65d4c4a..a786568 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -592,7 +592,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
592 else 592 else
593 { 593 {
594 // The traditional way is to call into the protocol stack to send them all. 594 // The traditional way is to call into the protocol stack to send them all.
595 pClient.SendLayerData(new float[10]); 595 pClient.SendLayerData();
596 } 596 }
597 } 597 }
598 598
@@ -1066,13 +1066,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1066 // Legacy update sending where the update is sent out as soon as noticed 1066 // Legacy update sending where the update is sent out as soon as noticed
1067 // We know the actual terrain data that is passed is ignored so this passes a dummy heightmap. 1067 // We know the actual terrain data that is passed is ignored so this passes a dummy heightmap.
1068 //float[] heightMap = terrData.GetFloatsSerialized(); 1068 //float[] heightMap = terrData.GetFloatsSerialized();
1069 float[] heightMap = new float[10]; 1069 int[] map = new int[]{ x / Constants.TerrainPatchSize, y / Constants.TerrainPatchSize };
1070 m_scene.ForEachClient( 1070 m_scene.ForEachClient(
1071 delegate (IClientAPI controller) 1071 delegate (IClientAPI controller)
1072 { 1072 {
1073 controller.SendLayerData(x / Constants.TerrainPatchSize, 1073 controller.SendLayerData(map);
1074 y / Constants.TerrainPatchSize,
1075 heightMap);
1076 } 1074 }
1077 ); 1075 );
1078 } 1076 }
@@ -1131,14 +1129,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1131 } 1129 }
1132 */ 1130 */
1133 1131
1134 float[] patchPieces = new float[toSend.Count * 2]; 1132 int[] patchPieces = new int[toSend.Count * 2];
1135 int pieceIndex = 0; 1133 int pieceIndex = 0;
1136 foreach (PatchesToSend pts in toSend) 1134 foreach (PatchesToSend pts in toSend)
1137 { 1135 {
1138 patchPieces[pieceIndex++] = pts.PatchX; 1136 patchPieces[pieceIndex++] = pts.PatchX;
1139 patchPieces[pieceIndex++] = pts.PatchY; 1137 patchPieces[pieceIndex++] = pts.PatchY;
1140 } 1138 }
1141 pups.Presence.ControllingClient.SendLayerData(-toSend.Count, 0, patchPieces); 1139 pups.Presence.ControllingClient.SendLayerData(patchPieces);
1142 } 1140 }
1143 if (pups.sendAll && toSend.Count < 1024) 1141 if (pups.sendAll && toSend.Count < 1024)
1144 SendAllModifiedPatchs(pups); 1142 SendAllModifiedPatchs(pups);
@@ -1206,16 +1204,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1206 npatchs = patchs.Count; 1204 npatchs = patchs.Count;
1207 if (npatchs > 0) 1205 if (npatchs > 0)
1208 { 1206 {
1209 int[] xPieces = new int[npatchs]; 1207 int[] patchPieces = new int[npatchs * 2];
1210 int[] yPieces = new int[npatchs];
1211 float[] patchPieces = new float[npatchs * 2];
1212 int pieceIndex = 0; 1208 int pieceIndex = 0;
1213 foreach (PatchesToSend pts in patchs) 1209 foreach (PatchesToSend pts in patchs)
1214 { 1210 {
1215 patchPieces[pieceIndex++] = pts.PatchX; 1211 patchPieces[pieceIndex++] = pts.PatchX;
1216 patchPieces[pieceIndex++] = pts.PatchY; 1212 patchPieces[pieceIndex++] = pts.PatchY;
1217 } 1213 }
1218 pups.Presence.ControllingClient.SendLayerData(-npatchs, 0, patchPieces); 1214 pups.Presence.ControllingClient.SendLayerData(patchPieces);
1219 } 1215 }
1220 } 1216 }
1221 1217
@@ -1457,8 +1453,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1457 { 1453 {
1458 //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); 1454 //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
1459 // SendLayerData does not use the heightmap parameter. This kludge is so as to not change IClientAPI. 1455 // SendLayerData does not use the heightmap parameter. This kludge is so as to not change IClientAPI.
1460 float[] heightMap = new float[10]; 1456 client.SendLayerData(new int[]{patchX, patchY});
1461 client.SendLayerData(patchX, patchY, heightMap);
1462 } 1457 }
1463 1458
1464 private void StoreUndoState() 1459 private void StoreUndoState()