aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 9d9967a..f036d85 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1000,11 +1000,24 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1000 return responsemap; 1000 return responsemap;
1001 } 1001 }
1002 1002
1003 public void RegenerateMaptile(byte[] data) 1003 public void GenerateMaptile()
1004 { 1004 {
1005 // Cannot create a map for a nonexistant heightmap
1006 if (m_scene.Heightmap == null)
1007 return;
1008
1009 //create a texture asset of the terrain
1010 IMapImageGenerator terrain = m_scene.RequestModuleInterface<IMapImageGenerator>();
1011 if (terrain == null)
1012 return;
1013
1014 byte[] data = terrain.WriteJpeg2000Image("defaultstripe.png");
1015 if (data == null)
1016 return;
1017
1005 UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID; 1018 UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID;
1006 1019
1007 m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE"); 1020 m_log.Debug("[WORLDMAP]: STORING MAPTILE IMAGE");
1008 1021
1009 m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random(); 1022 m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random();
1010 1023