aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-07 18:40:56 -0400
committerTeravus Ovares (Dan Olivares)2009-08-07 18:40:56 -0400
commitc8a68fb3fbac0d99b53a62bb062232c0d5695d3c (patch)
treebb010e480b095e48cd80fce04305f5e8cd290a3b /OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
parentSilly error, simple fix (diff)
downloadopensim-SC_OLD-c8a68fb3fbac0d99b53a62bb062232c0d5695d3c.zip
opensim-SC_OLD-c8a68fb3fbac0d99b53a62bb062232c0d5695d3c.tar.gz
opensim-SC_OLD-c8a68fb3fbac0d99b53a62bb062232c0d5695d3c.tar.bz2
opensim-SC_OLD-c8a68fb3fbac0d99b53a62bb062232c0d5695d3c.tar.xz
* Remove hard coded 256 limitations from various places. There's no more 256m limitation within the OpenSimulator framework, however, the LLClient ClientView does not support regions larger then 256 meters so, if you try and make your region larger by setting Constants.RegionSize = 512; in OpenSim.Framework.Constants.cs, the terrain will not display on clients using the LLUDP protocol
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
index 0364e7b..97ee451 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs
@@ -306,15 +306,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
306 306
307 double[,] hm = m_scene.Heightmap.GetDoubles(); 307 double[,] hm = m_scene.Heightmap.GetDoubles();
308 308
309 for (int x = 0; x < 256; x++) 309 for (int x = 0; x < (int)Constants.RegionSize; x++)
310 { 310 {
311 float columnRatio = x / 255f; // 0 - 1, for interpolation 311 float columnRatio = x / ((float)Constants.RegionSize - 1); // 0 - 1, for interpolation
312 for (int y = 0; y < 256; y++) 312 for (int y = 0; y < (int)Constants.RegionSize; y++)
313 { 313 {
314 float rowRatio = y / 255f; // 0 - 1, for interpolation 314 float rowRatio = y / ((float)Constants.RegionSize - 1); // 0 - 1, for interpolation
315 315
316 // Y flip the cordinates for the bitmap: hf origin is lower left, bm origin is upper left 316 // Y flip the cordinates for the bitmap: hf origin is lower left, bm origin is upper left
317 int yr = 255 - y; 317 int yr = ((int)Constants.RegionSize - 1) - y;
318 318
319 float heightvalue = getHeight(hm, x, y); 319 float heightvalue = getHeight(hm, x, y);
320 if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue)) 320 if (Single.IsInfinity(heightvalue) || Single.IsNaN(heightvalue))
@@ -366,7 +366,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
366 } 366 }
367 367
368 // Shade the terrain for shadows 368 // Shade the terrain for shadows
369 if (x < 255 && y < 255) 369 if (x < ((int)Constants.RegionSize - 1) && y < ((int)Constants.RegionSize - 1))
370 { 370 {
371 float hfvaluecompare = getHeight(hm, x + 1, y + 1); // light from north-east => look at land height there 371 float hfvaluecompare = getHeight(hm, x + 1, y + 1); // light from north-east => look at land height there
372 if (Single.IsInfinity(hfvaluecompare) || Single.IsNaN(hfvaluecompare)) 372 if (Single.IsInfinity(hfvaluecompare) || Single.IsNaN(hfvaluecompare))