aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-02-02 00:59:26 +0000
committerJustin Clark-Casey (justincc)2013-02-02 00:59:26 +0000
commit9588328242f4004446b5cc08251995b8d004b4f2 (patch)
tree3ee046d444d9c883183c3e54bfeb2f53fdd06617 /OpenSim/Region
parentSit and Spin reduction. If sitting, slam avatar angular velocity to zero. (diff)
downloadopensim-SC_OLD-9588328242f4004446b5cc08251995b8d004b4f2.zip
opensim-SC_OLD-9588328242f4004446b5cc08251995b8d004b4f2.tar.gz
opensim-SC_OLD-9588328242f4004446b5cc08251995b8d004b4f2.tar.bz2
opensim-SC_OLD-9588328242f4004446b5cc08251995b8d004b4f2.tar.xz
Stop exceptions being thrown if GenerateMapTiles = false but no static map tile has been set. Do more informative warn instead.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs17
2 files changed, 18 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
index a839086..26d22b8 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs
@@ -75,7 +75,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
75 public void Close() { } 75 public void Close() { }
76 public void PostInitialise() { } 76 public void PostInitialise() { }
77 77
78
79 ///<summary> 78 ///<summary>
80 /// 79 ///
81 ///</summary> 80 ///</summary>
@@ -133,7 +132,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
133 ///</summary> 132 ///</summary>
134 public void AddRegion(Scene scene) 133 public void AddRegion(Scene scene)
135 { 134 {
136 if (! m_enabled) 135 if (!m_enabled)
137 return; 136 return;
138 137
139 // Every shared region module has to maintain an indepedent list of 138 // Every shared region module has to maintain an indepedent list of
@@ -206,6 +205,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage
206 205
207 using (Image mapTile = tileGenerator.CreateMapTile()) 206 using (Image mapTile = tileGenerator.CreateMapTile())
208 { 207 {
208 // XXX: The MapImageModule will return a null if the user has chosen not to create map tiles and there
209 // is no static map tile.
210 if (mapTile == null)
211 return;
212
209 using (MemoryStream stream = new MemoryStream()) 213 using (MemoryStream stream = new MemoryStream())
210 { 214 {
211 mapTile.Save(stream, ImageFormat.Jpeg); 215 mapTile.Save(stream, ImageFormat.Jpeg);
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index d412efc..e7065dc 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -113,7 +113,6 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
113 //t = System.Environment.TickCount - t; 113 //t = System.Environment.TickCount - t;
114 //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);
115 115
116
117 if (drawPrimVolume) 116 if (drawPrimVolume)
118 { 117 {
119 DrawObjectVolume(m_scene, mapbmp); 118 DrawObjectVolume(m_scene, mapbmp);
@@ -121,7 +120,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
121 } 120 }
122 else 121 else
123 { 122 {
124 mapbmp = fetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID); 123 mapbmp = FetchTexture(m_scene.RegionInfo.RegionSettings.TerrainImageID);
125 } 124 }
126 return mapbmp; 125 return mapbmp;
127 } 126 }
@@ -232,11 +231,19 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
232// } 231// }
233// } 232// }
234 233
235 private Bitmap fetchTexture(UUID id) 234 private Bitmap FetchTexture(UUID id)
236 { 235 {
237 AssetBase asset = m_scene.AssetService.Get(id.ToString()); 236 AssetBase asset = m_scene.AssetService.Get(id.ToString());
238 m_log.DebugFormat("[MAPTILE]: Fetched static texture {0}, found: {1}", id, asset != null); 237
239 if (asset == null) return null; 238 if (asset != null)
239 {
240 m_log.DebugFormat("[MAPTILE]: Static map image texture {0} found for {1}", id, m_scene.Name);
241 }
242 else
243 {
244 m_log.WarnFormat("[MAPTILE]: Static map image texture {0} not found for {1}", id, m_scene.Name);
245 return null;
246 }
240 247
241 ManagedImage managedImage; 248 ManagedImage managedImage;
242 Image image; 249 Image image;