aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-03-20 20:15:57 +0000
committerJustin Clark-Casey (justincc)2014-03-20 20:15:57 +0000
commitd04bb3ca9b992b1c64af4570df8a3218b2ef25e7 (patch)
tree823acda5425d13b85a0e79d983f5a96a06e3a51e /OpenSim/Region/CoreModules
parentMantis 6974 PERMISSION_TRACK_CAMERA should be implicit on attach. (diff)
parentAllow MaptileStaticFile path to be set to anywhere and not force it to bin/ma... (diff)
downloadopensim-SC-d04bb3ca9b992b1c64af4570df8a3218b2ef25e7.zip
opensim-SC-d04bb3ca9b992b1c64af4570df8a3218b2ef25e7.tar.gz
opensim-SC-d04bb3ca9b992b1c64af4570df8a3218b2ef25e7.tar.bz2
opensim-SC-d04bb3ca9b992b1c64af4570df8a3218b2ef25e7.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs53
1 files changed, 35 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index 1dad8ba..556b11f 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -91,29 +91,46 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
91 91
92 if (generateMaptiles) 92 if (generateMaptiles)
93 { 93 {
94 if (textureTerrain) 94 if (String.IsNullOrEmpty(m_scene.RegionInfo.m_maptileStaticFile))
95 { 95 {
96 terrainRenderer = new TexturedMapTileRenderer(); 96 if (textureTerrain)
97 } 97 {
98 else 98 terrainRenderer = new TexturedMapTileRenderer();
99 { 99 }
100 terrainRenderer = new ShadedMapTileRenderer(); 100 else
101 } 101 {
102 terrainRenderer = new ShadedMapTileRenderer();
103 }
102 104
103 terrainRenderer.Initialise(m_scene, m_config); 105 terrainRenderer.Initialise(m_scene, m_config);
104 106
105 mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, 107 mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height,
106 System.Drawing.Imaging.PixelFormat.Format24bppRgb); 108 System.Drawing.Imaging.PixelFormat.Format24bppRgb);
107 //long t = System.Environment.TickCount; 109 //long t = System.Environment.TickCount;
108 //for (int i = 0; i < 10; ++i) { 110 //for (int i = 0; i < 10; ++i) {
109 terrainRenderer.TerrainToBitmap(mapbmp); 111 terrainRenderer.TerrainToBitmap(mapbmp);
110 //} 112 //}
111 //t = System.Environment.TickCount - t; 113 //t = System.Environment.TickCount - t;
112 //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t); 114 //m_log.InfoFormat("[MAPTILE] generation of 10 maptiles needed {0} ms", t);
113 115
114 if (drawPrimVolume) 116 if (drawPrimVolume)
117 {
118 DrawObjectVolume(m_scene, mapbmp);
119 }
120 }
121 else
115 { 122 {
116 DrawObjectVolume(m_scene, mapbmp); 123 try
124 {
125 mapbmp = new Bitmap(m_scene.RegionInfo.m_maptileStaticFile);
126 }
127 catch (Exception e)
128 {
129 m_log.ErrorFormat("[MAPTILE]: Failed to load Static map image texture file: {0} for {1}", m_scene.RegionInfo.m_maptileStaticFile, m_scene.Name);
130 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
131 mapbmp = null;
132 }
133 if (mapbmp != null) m_log.DebugFormat("[MAPTILE]: Static map image texture file {0} found for {1}", m_scene.RegionInfo.m_maptileStaticFile, m_scene.Name);
117 } 134 }
118 } 135 }
119 else 136 else