aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs5
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs15
2 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index 40638f8..61ba5f3 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -127,7 +127,10 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
127 try 127 try
128 { 128 {
129 using (Bitmap mapbmp = CreateMapTile()) 129 using (Bitmap mapbmp = CreateMapTile())
130 return OpenJPEG.EncodeFromImage(mapbmp, true); 130 {
131 if (mapbmp != null)
132 return OpenJPEG.EncodeFromImage(mapbmp, true);
133 }
131 } 134 }
132 catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke 135 catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke
133 { 136 {
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index a26a5f0..8df9623 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -114,6 +114,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
114 "export-map [<path>]", 114 "export-map [<path>]",
115 "Save an image of the world map", HandleExportWorldMapConsoleCommand); 115 "Save an image of the world map", HandleExportWorldMapConsoleCommand);
116 116
117 m_scene.AddCommand(
118 "Regions", this, "generate map",
119 "generate map",
120 "Generates and stores a new maptile.", HandleGenerateMapConsoleCommand);
121
117 AddHandlers(); 122 AddHandlers();
118 } 123 }
119 } 124 }
@@ -1255,6 +1260,16 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1255 m_scene.RegionInfo.RegionName, exportPath); 1260 m_scene.RegionInfo.RegionName, exportPath);
1256 } 1261 }
1257 1262
1263 public void HandleGenerateMapConsoleCommand(string module, string[] cmdparams)
1264 {
1265 Scene consoleScene = m_scene.ConsoleScene();
1266
1267 if (consoleScene != null && consoleScene != m_scene)
1268 return;
1269
1270 GenerateMaptile();
1271 }
1272
1258 public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint) 1273 public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint)
1259 { 1274 {
1260 uint xstart = 0; 1275 uint xstart = 0;