diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 03a4d34..94072a5 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -1458,7 +1458,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1458 | if (consoleScene != null && consoleScene != m_scene) | 1458 | if (consoleScene != null && consoleScene != m_scene) |
1459 | return; | 1459 | return; |
1460 | 1460 | ||
1461 | GenerateMaptile(); | 1461 | GenerateMaptileForce(); |
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint) | 1464 | public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint) |
@@ -1572,6 +1572,28 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1572 | return responsemap; | 1572 | return responsemap; |
1573 | } | 1573 | } |
1574 | 1574 | ||
1575 | private void GenerateMaptileForce() | ||
1576 | { | ||
1577 | // Cannot create a map for a nonexistent heightmap | ||
1578 | if (m_scene.Heightmap == null) | ||
1579 | return; | ||
1580 | |||
1581 | if (m_mapImageGenerator == null) | ||
1582 | { | ||
1583 | Console.WriteLine("No map image generator available for {0}", m_scene.Name); | ||
1584 | return; | ||
1585 | } | ||
1586 | m_log.DebugFormat("[WORLD MAP]: Generating map image for {0}", m_scene.Name); | ||
1587 | |||
1588 | using (Bitmap mapbmp = m_mapImageGenerator.CreateMapTileForce()) | ||
1589 | { | ||
1590 | GenerateMaptile(mapbmp); | ||
1591 | |||
1592 | if (m_mapImageServiceModule != null) | ||
1593 | m_mapImageServiceModule.UploadMapTile(m_scene, mapbmp); | ||
1594 | } | ||
1595 | } | ||
1596 | |||
1575 | public void GenerateMaptile() | 1597 | public void GenerateMaptile() |
1576 | { | 1598 | { |
1577 | // Cannot create a map for a nonexistent heightmap | 1599 | // Cannot create a map for a nonexistent heightmap |