diff options
author | Justin Clark-Casey (justincc) | 2010-08-13 20:34:46 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-08-13 20:34:46 +0100 |
commit | 5f5c65e4bae1f2a84d6972697d0413137f6b1da1 (patch) | |
tree | 9d02b3aa7b4e6417ca4cf2661cc530d71637acab /OpenSim/Region/CoreModules | |
parent | refactor: Use SOP.Flags rather than SOP.ObjectFlags (diff) | |
download | opensim-SC-5f5c65e4bae1f2a84d6972697d0413137f6b1da1.zip opensim-SC-5f5c65e4bae1f2a84d6972697d0413137f6b1da1.tar.gz opensim-SC-5f5c65e4bae1f2a84d6972697d0413137f6b1da1.tar.bz2 opensim-SC-5f5c65e4bae1f2a84d6972697d0413137f6b1da1.tar.xz |
refactor: move more map tile generation code from scene to IWorldMapModule
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 17 |
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 | ||