aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index bbbb4d7..4ff22fb 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -1261,13 +1261,13 @@ namespace OpenSim.Region.Terrain
1261 } 1261 }
1262 1262
1263 Channel copy = heightmap.Copy(); 1263 Channel copy = heightmap.Copy();
1264 for (int y = 0; y < copy.h; y++) 1264 for (int y = 0; y <copy.h; y++)
1265 { 1265 {
1266 for (int x = 0; x < copy.w; x++) 1266 for (int x = 0; x < copy.w; x++)
1267 { 1267 {
1268 // 512 is the largest possible height before colours clamp 1268 // 512 is the largest possible height before colours clamp
1269 int colorindex = (int) (Math.Max(Math.Min(1.0, copy.Get(x, y)/512.0), 0.0)*(pallete - 1)); 1269 int colorindex = (int) (Math.Max(Math.Min(1.0, copy.Get(x, y)/512.0), 0.0)*(pallete - 1));
1270 bmp.SetPixel(x, y, colours[colorindex]); 1270 bmp.SetPixel(x, copy.h-y-1, colours[colorindex]);
1271 } 1271 }
1272 } 1272 }
1273 return bmp; 1273 return bmp;