diff options
Fixed inverted map texture problem.
Added(from trunk) the loading of terrain files defined in the region.xml files.
Diffstat (limited to 'OpenSim/OpenSim.Terrain.BasicTerrain')
-rw-r--r-- | OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs | 3 |
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 | } |