From 99a308007c6c13dc13a2184eb34014de94d75ea8 Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 17 Jun 2007 19:25:04 +0000 Subject: Fixed inverted map texture problem. Added(from trunk) the loading of terrain files defined in the region.xml files. --- OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/OpenSim.Terrain.BasicTerrain') diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs index e5831a0..fc4ca24 100644 --- a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs @@ -536,7 +536,7 @@ namespace OpenSim.Terrain for (int y = 0; y < copy.h; y++) { // 512 is the largest possible height before colours clamp - int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(copy.w -x, copy.h - y) / 512.0), 0.0) * pallete); + int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(copy.h - y, x) / 512.0), 0.0) * pallete); bmp.SetPixel(x, y, colours[colorindex]); } } @@ -549,6 +549,7 @@ namespace OpenSim.Terrain { Console.WriteLine("Failed generating terrain map: " + e.ToString()); } + return imageData; } } -- cgit v1.1