Fixed inverted map texture problem.

Added(from trunk) the loading of terrain files defined in the region.xml files.
This commit is contained in:
MW
2007-06-17 19:25:04 +00:00
parent ef494fdf9c
commit 99a308007c
28 changed files with 88 additions and 8 deletions

View File

@@ -415,10 +415,31 @@ namespace OpenSim.Region.Scenes
float[] map = this.localStorage.LoadWorld();
if (map == null)
{
Console.WriteLine("creating new terrain");
this.Terrain.hills();
// Console.WriteLine("creating new terrain");
// this.Terrain.hills();
// this.localStorage.SaveMap(this.Terrain.getHeights1D());
if (string.IsNullOrEmpty(this.m_regInfo.estateSettings.terrainFile))
{
Console.WriteLine("No default terrain, procedurally generating...");
this.Terrain.hills();
// this.localStorage.SaveMap(this.Terrain.getHeights1D());
}
else
{
try
{
this.Terrain.loadFromFileF32(this.m_regInfo.estateSettings.terrainFile);
this.Terrain *= this.m_regInfo.estateSettings.terrainMultiplier;
}
catch
{
Console.WriteLine("Unable to load default terrain, procedurally generating instead...");
Terrain.hills();
}
// this.localStorage.SaveMap(this.Terrain.getHeights1D());
}
}
else
{