From 601914ecd807d9e36c0d9898562e730155a6051e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 19 Aug 2015 16:28:03 +0100 Subject: find sending of initial terrain using PushTerrain as os core --- OpenSim/Region/Framework/Interfaces/ITerrainModule.cs | 9 ++++++++- OpenSim/Region/Framework/Scenes/SceneBase.cs | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs index 5947afb..4e2f4e1 100644 --- a/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ITerrainModule.cs @@ -27,6 +27,7 @@ using System.IO; +using OpenSim.Framework; using OpenMetaverse; namespace OpenSim.Region.Framework.Interfaces @@ -42,7 +43,13 @@ namespace OpenSim.Region.Framework.Interfaces /// Use this if you change terrain data outside of the terrain module (e.g. in osTerrainSetHeight) /// void TaintTerrain(); - + + /// + /// When a client initially connects, all the terrain must be pushed to the viewer. + /// This call causes all the terrain patches to be sent to the client. + /// + void PushTerrain(IClientAPI pClient); + /// /// Load a terrain from a stream. /// diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index f5be7a7..9648030 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -211,7 +211,12 @@ namespace OpenSim.Region.Framework.Scenes /// Client to send to public virtual void SendLayerData(IClientAPI RemoteClient) { - RemoteClient.SendLayerData(Heightmap.GetFloatsSerialised()); +// RemoteClient.SendLayerData(Heightmap.GetFloatsSerialised()); + ITerrainModule terrModule = RequestModuleInterface(); + if (terrModule != null) + { + terrModule.PushTerrain(RemoteClient); + } } #endregion -- cgit v1.1