diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 2c5e44432c..cb801111f9 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs @@ -586,8 +586,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain client.OnModifyTerrain += client_OnModifyTerrain; client.OnBakeTerrain += client_OnBakeTerrain; client.OnLandUndo += client_OnLandUndo; + client.OnUnackedTerrain += client_OnUnackedTerrain; } - + /// /// Checks to see if the terrain has been modified since last check /// but won't attempt to limit those changes to the limits specified in the estate settings @@ -808,6 +809,12 @@ namespace OpenSim.Region.CoreModules.World.Terrain InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter } } + + protected void client_OnUnackedTerrain(IClientAPI client, int patchX, int patchY) + { + //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); + client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); + } private void StoreUndoState() { diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 631046a162..50f6b710bc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2770,7 +2770,6 @@ namespace OpenSim.Region.Framework.Scenes public virtual void SubscribeToClientTerrainEvents(IClientAPI client) { client.OnRegionHandShakeReply += SendLayerData; - client.OnUnackedTerrain += TerrainUnAcked; } public virtual void SubscribeToClientPrimEvents(IClientAPI client) @@ -2901,7 +2900,6 @@ namespace OpenSim.Region.Framework.Scenes public virtual void UnSubscribeToClientTerrainEvents(IClientAPI client) { client.OnRegionHandShakeReply -= SendLayerData; - client.OnUnackedTerrain -= TerrainUnAcked; } public virtual void UnSubscribeToClientPrimEvents(IClientAPI client) @@ -4481,12 +4479,6 @@ namespace OpenSim.Region.Framework.Scenes client.SendRegionHandle(regionID, handle); } - public void TerrainUnAcked(IClientAPI client, int patchX, int patchY) - { - //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); - client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised()); - } - public bool NeedSceneCacheClear(UUID agentID) { IInventoryTransferModule inv = RequestModuleInterface();