* Fixing world map generation issues (thankyou LL for using different coordinates than the rest of the graphics community! =p)

zircon^2
Adam Frisby 2007-06-02 03:00:37 +00:00
parent 6072fd8667
commit 79de35aea2
2 changed files with 3 additions and 3 deletions

View File

@ -230,7 +230,7 @@ namespace OpenSim.world
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving.");
localStorage.SaveMap(Terrain.getHeights1D());
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Rebuilding world map image.");
Terrain.exportImage("map_" + m_regInfo.RegionName + ".png", "defaultstripe.png");
Terrain.exportImage("map_" + m_regInfo.RegionName.ToLower() + ".png", "defaultstripe.png");
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics.");
phyScene.SetTerrain(Terrain.getHeights1D());
@ -435,7 +435,7 @@ namespace OpenSim.world
}
catch (Exception e)
{
Console.WriteLine("Unable to load default terrain (" + e.ToString() + "), procedurally generating instead...");
Console.WriteLine("Unable to load default terrain, procedurally generating instead...");
Terrain.hills();
}
this.localStorage.SaveMap(this.Terrain.getHeights1D());

View File

@ -469,7 +469,7 @@ namespace OpenSim.Terrain
{
// 512 is the largest possible height before colours clamp
int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(x, y) / 512.0), 0.0) * pallete);
bmp.SetPixel(x, y, colours[colorindex]);
bmp.SetPixel(y, 255 - x, colours[colorindex]);
}
}