aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-06-02 03:00:37 +0000
committerAdam Frisby2007-06-02 03:00:37 +0000
commit79de35aea2d9c694ece9a0d6af7142bdf4aab491 (patch)
tree93375a7043b60d5afb496df3879ff372f8afe8bb
parent* Some commenting on asset server (needs completing) (diff)
downloadopensim-SC_OLD-79de35aea2d9c694ece9a0d6af7142bdf4aab491.zip
opensim-SC_OLD-79de35aea2d9c694ece9a0d6af7142bdf4aab491.tar.gz
opensim-SC_OLD-79de35aea2d9c694ece9a0d6af7142bdf4aab491.tar.bz2
opensim-SC_OLD-79de35aea2d9c694ece9a0d6af7142bdf4aab491.tar.xz
* Fixing world map generation issues (thankyou LL for using different coordinates than the rest of the graphics community! =p)
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.RegionServer/world/World.cs4
-rw-r--r--OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs2
2 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs
index 22beb0e..ad1ce30 100644
--- a/OpenSim/OpenSim.RegionServer/world/World.cs
+++ b/OpenSim/OpenSim.RegionServer/world/World.cs
@@ -230,7 +230,7 @@ namespace OpenSim.world
230 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving."); 230 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving.");
231 localStorage.SaveMap(Terrain.getHeights1D()); 231 localStorage.SaveMap(Terrain.getHeights1D());
232 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Rebuilding world map image."); 232 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Rebuilding world map image.");
233 Terrain.exportImage("map_" + m_regInfo.RegionName + ".png", "defaultstripe.png"); 233 Terrain.exportImage("map_" + m_regInfo.RegionName.ToLower() + ".png", "defaultstripe.png");
234 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics."); 234 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics.");
235 phyScene.SetTerrain(Terrain.getHeights1D()); 235 phyScene.SetTerrain(Terrain.getHeights1D());
236 236
@@ -435,7 +435,7 @@ namespace OpenSim.world
435 } 435 }
436 catch (Exception e) 436 catch (Exception e)
437 { 437 {
438 Console.WriteLine("Unable to load default terrain (" + e.ToString() + "), procedurally generating instead..."); 438 Console.WriteLine("Unable to load default terrain, procedurally generating instead...");
439 Terrain.hills(); 439 Terrain.hills();
440 } 440 }
441 this.localStorage.SaveMap(this.Terrain.getHeights1D()); 441 this.localStorage.SaveMap(this.Terrain.getHeights1D());
diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
index aa785b0..047187a 100644
--- a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs
@@ -469,7 +469,7 @@ namespace OpenSim.Terrain
469 { 469 {
470 // 512 is the largest possible height before colours clamp 470 // 512 is the largest possible height before colours clamp
471 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(x, y) / 512.0), 0.0) * pallete); 471 int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(x, y) / 512.0), 0.0) * pallete);
472 bmp.SetPixel(x, y, colours[colorindex]); 472 bmp.SetPixel(y, 255 - x, colours[colorindex]);
473 } 473 }
474 } 474 }
475 475