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 <nebadon2025@gmail.com>0.8.2-post-fixes
parent
c7f6e248e8
commit
297d31b1c2
|
@ -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<IMapImageUploadModule>(this);
|
||||
}
|
||||
|
|
|
@ -1462,7 +1462,13 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
m_log.DebugFormat("[WORLD MAP]: Generating map image for {0}", m_scene.Name);
|
||||
|
||||
using (Bitmap mapbmp = m_mapImageGenerator.CreateMapTile())
|
||||
{
|
||||
// V1 (This Module)
|
||||
GenerateMaptile(mapbmp);
|
||||
|
||||
// v2/3 (MapImageServiceModule)
|
||||
m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp);
|
||||
}
|
||||
}
|
||||
|
||||
private void GenerateMaptile(Bitmap mapbmp)
|
||||
|
|
Loading…
Reference in New Issue