From 297d31b1c2ab9ddb5f251ebbfdd36aa6d69a5a4c Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Mon, 13 Jul 2015 11:49:57 +0100 Subject: Prevent two maptiles being generated at startup, one for v1 and another for v2-3 service. * v1 Service (WorldMapModule) is called directly by scene on startup. This patch moves the initial map registration of the v2-3 service (MapImageServiceModule) to that point so they can share the bitmap instead of doubling the work of Warp3D and exasperate its memory leak issues. Signed-off-by: Michael Cerquoni --- .../ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index 7dfe53a..860a526 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs @@ -151,7 +151,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage lock (m_scenes) m_scenes[scene.RegionInfo.RegionID] = scene; - scene.EventManager.OnRegionReadyStatusChange += s => { if (s.Ready) UploadMapTile(s); }; + // v2 Map generation on startup is now handled by scene to allow bmp to be shared with + // v1 service and not generate map tiles twice as was previous behavior + //scene.EventManager.OnRegionReadyStatusChange += s => { if (s.Ready) UploadMapTile(s); }; scene.RegisterModuleInterface(this); } -- cgit v1.1