From 9c3ec87b976edb37114a489ce83b1e8f8e9a6851 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Sun, 19 Apr 2009 13:33:46 +0000 Subject: [PATCH] Moved ITerrainModule and ITerainEffect to OpenSim.Region.Framework.Interfaces and added a TaintTerrain method --- .../Region/CoreModules/World/Terrain/TerrainModule.cs | 9 ++++++++- .../Terrain => Framework/Interfaces}/ITerrainEffect.cs | 4 +--- .../Terrain => Framework/Interfaces}/ITerrainModule.cs | 8 +++++++- 3 files changed, 16 insertions(+), 5 deletions(-) rename OpenSim/Region/{CoreModules/World/Terrain => Framework/Interfaces}/ITerrainEffect.cs (94%) rename OpenSim/Region/{CoreModules/World/Terrain => Framework/Interfaces}/ITerrainModule.cs (89%) diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 5893a113c3..045fbb157f 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -82,7 +82,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain private Dictionary m_plugineffects; private ITerrainChannel m_revert; private Scene m_scene; - private bool m_tainted; + private volatile bool m_tainted; #region ICommandableModule Members @@ -327,6 +327,11 @@ namespace OpenSim.Region.CoreModules.World.Terrain } } + public void TaintTerrain () + { + CheckForTerrainUpdates(); + } + #region Plugin Loading Methods private void LoadPlugins() @@ -1080,6 +1085,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain m_scene.RegisterModuleCommander(m_commander); } + #endregion + } } diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainEffect.cs b/OpenSim/Region/Framework/Interfaces/ITerrainEffect.cs similarity index 94% rename from OpenSim/Region/CoreModules/World/Terrain/ITerrainEffect.cs rename to OpenSim/Region/Framework/Interfaces/ITerrainEffect.cs index 40b9f5acd4..454aaaadf6 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainEffect.cs +++ b/OpenSim/Region/Framework/Interfaces/ITerrainEffect.cs @@ -25,9 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using OpenSim.Region.Framework.Interfaces; - -namespace OpenSim.Region.CoreModules.World.Terrain +namespace OpenSim.Region.Framework.Interfaces { public interface ITerrainEffect { diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainModule.cs b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs similarity index 89% rename from OpenSim/Region/CoreModules/World/Terrain/ITerrainModule.cs rename to OpenSim/Region/Framework/Interfaces/ITerrainModule.cs index 9ca7de0dc0..378a80d202 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs @@ -29,13 +29,19 @@ using System.IO; using OpenMetaverse; -namespace OpenSim.Region.CoreModules.World.Terrain +namespace OpenSim.Region.Framework.Interfaces { public interface ITerrainModule { void LoadFromFile(string filename); void SaveToFile(string filename); void ModifyTerrain(UUID user, Vector3 pos, byte size, byte action, UUID agentId); + + /// + /// Taint the terrain. This will lead to sending the terrain data to the clients again. + /// Use this if you change terrain data outside of the terrain module (e.g. in osTerrainSetHeight) + /// + void TaintTerrain(); /// /// Load a terrain from a stream.