diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/WorldMap')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs index ea8aa55..ac6d9b5 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs | |||
@@ -166,14 +166,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
166 | 166 | ||
167 | double[,] hm = whichScene.Heightmap.GetDoubles(); | 167 | double[,] hm = whichScene.Heightmap.GetDoubles(); |
168 | bool ShadowDebugContinue = true; | 168 | bool ShadowDebugContinue = true; |
169 | //Color prim = Color.FromArgb(120, 120, 120); | 169 | |
170 | //LLVector3 RayEnd = new LLVector3(0, 0, 0); | ||
171 | //LLVector3 RayStart = new LLVector3(0, 0, 0); | ||
172 | //LLVector3 direction = new LLVector3(0, 0, -1); | ||
173 | //Vector3 AXOrigin = new Vector3(); | ||
174 | //Vector3 AXdirection = new Vector3(); | ||
175 | //Ray testRay = new Ray(); | ||
176 | //EntityIntersection rt = new EntityIntersection(); | ||
177 | bool terraincorruptedwarningsaid = false; | 170 | bool terraincorruptedwarningsaid = false; |
178 | 171 | ||
179 | float low = 255; | 172 | float low = 255; |
@@ -204,23 +197,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
204 | //int tc = System.Environment.TickCount; | 197 | //int tc = System.Environment.TickCount; |
205 | for (int y = 0; y < 256; y++) | 198 | for (int y = 0; y < 256; y++) |
206 | { | 199 | { |
207 | //RayEnd = new LLVector3(x, y, 0); | 200 | |
208 | //RayStart = new LLVector3(x, y, 255); | ||
209 | |||
210 | //direction = LLVector3.Norm(RayEnd - RayStart); | ||
211 | //AXOrigin = new Vector3(RayStart.X, RayStart.Y, RayStart.Z); | ||
212 | //AXdirection = new Vector3(direction.X, direction.Y, direction.Z); | ||
213 | |||
214 | //testRay = new Ray(AXOrigin, AXdirection); | ||
215 | //rt = m_innerScene.GetClosestIntersectingPrim(testRay); | ||
216 | |||
217 | //if (rt.HitTF) | ||
218 | //{ | ||
219 | //mapbmp.SetPixel(x, y, prim); | ||
220 | //} | ||
221 | //else | ||
222 | //{ | ||
223 | //float tmpval = (float)hm[x, y]; | ||
224 | float heightvalue = (float)hm[x, y]; | 201 | float heightvalue = (float)hm[x, y]; |
225 | 202 | ||
226 | 203 | ||
@@ -298,7 +275,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
298 | int g = Shade.G; | 275 | int g = Shade.G; |
299 | int b = Shade.B; | 276 | int b = Shade.B; |
300 | Shade = Color.FromArgb((r - hfdiffi > 0) ? r - hfdiffi : 0, (g - hfdiffi > 0) ? g - hfdiffi : 0, (b - hfdiffi > 0) ? b - hfdiffi : 0); | 277 | Shade = Color.FromArgb((r - hfdiffi > 0) ? r - hfdiffi : 0, (g - hfdiffi > 0) ? g - hfdiffi : 0, (b - hfdiffi > 0) ? b - hfdiffi : 0); |
301 | //Console.WriteLine("d:" + hfdiff.ToString() + ", i:" + hfdiffi + ", pos: " + x + "," + y + " - R:" + Shade.R.ToString() + ", G:" + Shade.G.ToString() + ", B:" + Shade.G.ToString()); | ||
302 | mapbmp.SetPixel(x - 1, (256 - y) - 1, Shade); | 278 | mapbmp.SetPixel(x - 1, (256 - y) - 1, Shade); |
303 | } | 279 | } |
304 | } | 280 | } |
@@ -325,6 +301,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
325 | } | 301 | } |
326 | else | 302 | else |
327 | { | 303 | { |
304 | // We're under the water level with the terrain, so paint water instead of land | ||
305 | |||
328 | // Y flip the cordinates | 306 | // Y flip the cordinates |
329 | heightvalue = (float)whichScene.RegionInfo.RegionSettings.WaterHeight - heightvalue; | 307 | heightvalue = (float)whichScene.RegionInfo.RegionSettings.WaterHeight - heightvalue; |
330 | if (heightvalue > 19) | 308 | if (heightvalue > 19) |
@@ -360,10 +338,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
360 | } | 338 | } |
361 | } | 339 | } |
362 | } | 340 | } |
363 | //} | ||
364 | |||
365 | //tc = System.Environment.TickCount - tc; | ||
366 | //m_log.Info("[MAPTILE]: Completed One row in " + tc + " ms"); | ||
367 | } | 341 | } |
368 | m_log.Info("[MAPTILE]: Generating Maptile Step 1: Done in " + (System.Environment.TickCount - tc) + " ms"); | 342 | m_log.Info("[MAPTILE]: Generating Maptile Step 1: Done in " + (System.Environment.TickCount - tc) + " ms"); |
369 | 343 | ||
@@ -402,6 +376,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap | |||
402 | // | 376 | // |
403 | try | 377 | try |
404 | { | 378 | { |
379 | // get the null checks out of the way | ||
380 | // skip the ones that break | ||
405 | if (part == null) | 381 | if (part == null) |
406 | continue; | 382 | continue; |
407 | 383 | ||