From a2009ffe2e71afefad79471811418df8958870ab Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Mar 2012 13:08:05 -0700 Subject: Terrain: added [Terrain] section with an option to load an initial flat terrain. Default is still pinhead island. I much rather have a flat land in the beginning. --- OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index cf000a4..ef9c95c 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -86,6 +86,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain private volatile bool m_tainted; private readonly Stack m_undo = new Stack(5); + private String m_InitialTerrain = "pinhead-island"; + /// /// Human readable list of terrain file extensions that are supported. /// @@ -109,6 +111,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain /// Config for the region public void Initialise(IConfigSource config) { + IConfig terrainConfig = config.Configs["Terrain"]; + if (terrainConfig != null) + m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain); } public void AddRegion(Scene scene) @@ -120,7 +125,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain { if (m_scene.Heightmap == null) { - m_channel = new TerrainChannel(); + m_channel = new TerrainChannel(m_InitialTerrain); m_scene.Heightmap = m_channel; m_revert = new TerrainChannel(); UpdateRevertMap(); -- cgit v1.1