From 5d20f04e08c65b37bbdda187c30ce038872307ab Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 13 Aug 2010 21:18:26 +0100 Subject: refactor: move Scene.TerrainUnAcked() handling into TerrainModule --- OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | 9 ++++++++- OpenSim/Region/Framework/Scenes/Scene.cs | 8 -------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index 2c5e444..cb80111 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 631046a..50f6b71 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(); -- cgit v1.1