aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
diff options
context:
space:
mode:
authorMW2007-06-17 19:25:04 +0000
committerMW2007-06-17 19:25:04 +0000
commit99a308007c6c13dc13a2184eb34014de94d75ea8 (patch)
treeb696f870406953b7465313e9eda4210c94f85a38 /OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
parentEach Region will now generate a texture image of their terrain and this will ... (diff)
downloadopensim-SC-99a308007c6c13dc13a2184eb34014de94d75ea8.zip
opensim-SC-99a308007c6c13dc13a2184eb34014de94d75ea8.tar.gz
opensim-SC-99a308007c6c13dc13a2184eb34014de94d75ea8.tar.bz2
opensim-SC-99a308007c6c13dc13a2184eb34014de94d75ea8.tar.xz
Fixed inverted map texture problem.
Added(from trunk) the loading of terrain files defined in the region.xml files.
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs3
1 files changed, 2 insertions, 1 deletions
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
536 for (int y = 0; y < copy.h; y++) 536 for (int y = 0; y < copy.h; y++)
537 { 537 {
538 // 512 is the largest possible height before colours clamp 538 // 512 is the largest possible height before colours clamp
539 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(copy.w -x, copy.h - y) / 512.0), 0.0) * pallete); 539 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(copy.h - y, x) / 512.0), 0.0) * pallete);
540 bmp.SetPixel(x, y, colours[colorindex]); 540 bmp.SetPixel(x, y, colours[colorindex]);
541 } 541 }
542 } 542 }
@@ -549,6 +549,7 @@ namespace OpenSim.Terrain
549 { 549 {
550 Console.WriteLine("Failed generating terrain map: " + e.ToString()); 550 Console.WriteLine("Failed generating terrain map: " + e.ToString());
551 } 551 }
552
552 return imageData; 553 return imageData;
553 } 554 }
554 } 555 }