aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/WorldMap
diff options
context:
space:
mode:
authoronefang2019-08-22 12:01:47 +1000
committeronefang2019-08-22 12:01:47 +1000
commitfe8977564bda8ec2f328ebb2d2623c43073e9be5 (patch)
tree3bd04d2a64dcd8d141c5f4221c581fa215c2c3ad /OpenSim/Region/CoreModules/World/WorldMap
parentOhSillyThreatLevels should throw an exception when not allowed. (diff)
downloadopensim-SC_OLD-fe8977564bda8ec2f328ebb2d2623c43073e9be5.zip
opensim-SC_OLD-fe8977564bda8ec2f328ebb2d2623c43073e9be5.tar.gz
opensim-SC_OLD-fe8977564bda8ec2f328ebb2d2623c43073e9be5.tar.bz2
opensim-SC_OLD-fe8977564bda8ec2f328ebb2d2623c43073e9be5.tar.xz
When the generate map command is given, generate the map.
The month check seems a bit dodgy, but I'll let it ride for now.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs24
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