find sending of initial terrain using PushTerrain as os core

avinationmerge
UbitUmarov 2015-08-19 16:28:03 +01:00
parent 7661366223
commit 601914ecd8
2 changed files with 14 additions and 2 deletions

View File

@ -27,6 +27,7 @@
using System.IO; using System.IO;
using OpenSim.Framework;
using OpenMetaverse; using OpenMetaverse;
namespace OpenSim.Region.Framework.Interfaces 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) /// Use this if you change terrain data outside of the terrain module (e.g. in osTerrainSetHeight)
/// </summary> /// </summary>
void TaintTerrain(); void TaintTerrain();
/// <summary>
/// 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.
/// </summary>
void PushTerrain(IClientAPI pClient);
/// <summary> /// <summary>
/// Load a terrain from a stream. /// Load a terrain from a stream.
/// </summary> /// </summary>

View File

@ -211,7 +211,12 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="RemoteClient">Client to send to</param> /// <param name="RemoteClient">Client to send to</param>
public virtual void SendLayerData(IClientAPI RemoteClient) public virtual void SendLayerData(IClientAPI RemoteClient)
{ {
RemoteClient.SendLayerData(Heightmap.GetFloatsSerialised()); // RemoteClient.SendLayerData(Heightmap.GetFloatsSerialised());
ITerrainModule terrModule = RequestModuleInterface<ITerrainModule>();
if (terrModule != null)
{
terrModule.PushTerrain(RemoteClient);
}
} }
#endregion #endregion